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
Get step-by-step solutions from verified subject matter experts
