Question: You are given three sorted arrays A , B , and C each having n numbers. You can assume that you can compare two elements

You are given three sorted arrays A, B, and C each having n numbers. You can assume that you can compare two elements from AU BUC in O(1)-time. Let k be an integer. Design an algorithm that outputs the k-th smallest element of AU BUC. The running time of your algorithm must be faster than O(n). Try to optimize the running time of your algorithm as much as possible.

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 Databases Questions!