Question: Question 1 : k - th Smallest Element from Two Lists ( 8 points ) Suppose you are given two sorted lists A [ 1

Question 1: k-th Smallest Element from Two Lists (8 points)
Suppose you are given two sorted lists A[1,dots,n] and B=[1,dots,m] of size n and m, respectively.
Give an O(logk) algorithm to find the k-th smallest element in AB, i.e., of the combination of the two
arrays. For simplicity, you can assume kmin(m,n). Justify the correctness and running time of your
algorithm. (Hint: What other algorithms do you know that have logarithmic running time? Can a similar
approach be used here?)
Question 1 : k - th Smallest Element from Two

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!