Question: Suppose arrays A and B are both sorted and both contain N elements. Give an O(logN) algorithm to find the median of A B.
Suppose arrays A and B are both sorted and both contain N elements. Give an O(logN) algorithm to find the median of A ∪ B.
Step by Step Solution
3.28 Rating (169 Votes )
There are 3 Steps involved in it
Look at the middle elements of A and B Let m 1 and m 2 be these two middle elements assume m 1 is t... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
1486-C-S-A(438).docx
120 KBs Word File
