solve MedianOfTwoSortedArray