Note: This is Part II of the article: The Painter’s Partition Problem. Please read Part I for more background information.
Given two sorted arrays A, B of size m and n respectively. Find the k-th smallest element in the union of A and B. You can assume that there are no duplicate elements.
Find the intersection of two sorted arrays.