Question: 7. The divide and conquer algorithm, binary search, finds the median of a sorted array of length n is O(log n) time. Suppose a set

7. The divide and conquer algorithm, binary search, finds the median of a sorted array of length n is O(log n) time. Suppose a set of items is given to you in two sorted arrays, say X of length n and Y of length m. Write a divide and conquer algorithm which finds the median item of that set, namely the union of the items in X and the items in Y For example, if you are given the arrays: X = (1,2,5,6,9) and Y = (3,7, 10,11), the median item is 6. You may assume that there are no duplicate items, if that helps. If the number of items is even, the median item could be either of the two middle items. I have not given this algorithm in class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
