logn
algo:
let the two sorted arrays are a1[1...m] a2[1....n]
median of a1=m1
median of a2=m2
1.find m1 and m2.
2. if m1==m2 then m1 is the median
3 if m1< m2 then median is between a1[m/2.....m] and a2[0....n/2] so repeat the steps 1,2,3 on a1[m/2....m] and a2[0.....n/2].
4.if m1> m2 then median is between a2[n/2.....n] and a1[0....m/2] so repeat the steps 1,2,3 on a2[n/2.....n] and a1[0....m/2].
add the base cases accordingly.
time complexity logm + logn as we are dividing the array each time into half