Question: 1. Come up with an efficient algorithm to find the median of all numbers in two arrays, A[1...n] and B[1....n], if n is really large.

1. Come up with an efficient algorithm to find the median of all numbers in two arrays, A[1...n] and B[1....n], if n is really large. Analyze the running time of the algorithm.

2. Suppose B still has 1...n elements B[1....n], but A has n2 elements A[1..n2], n still being very large. Come up with an efficient algorithm for finding the median of all the numbers. Analyze the running time of the algorithm.

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!