Why is it important for m <=n in the solution ?
because there can be a case such that answer does not exist in array1.
A: 1,2 n=2
B: 5,6,7,8,9 m=5
answer is 6, but if you search for median in A you will never find it.