My question is with reference to Method 2 of this link. Here two equal length sorted arrays are given and we have to find the median of the two arrays merged.
@jayadev :
I don't agree with your answer.
"The first half of ar2, all n/2 elements have to go to the top of this new median and second half of arr1 all n/2 elements will have to go below this median "
Consider this test case:
a1 = {1,2,15,16,17}
a2 = {4,5,10,18,20}