update solution for leetcode(Median of two sorted arrays)