Question: Consider 2 n numbers organized in two arrays A [ 1 . . n ] and B [ 1 . . n ] both of

Consider 2n numbers organized in two arrays A[1..n] and B[1..n] both of size n each. Also,
both these arrays are sorted. Your task is to find the median of these 2n numbers. Median
of k numbers is defined as |??k2??| th smallest element. You can assume n to be a power of 2.
What is the fastest algorithm that you can design to find the median?
Consider 2 n numbers organized in two arrays A [

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!