Solve median of 2 sorted arrays in O(n+m)