There are two sorted arrays A and B of size mand n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
这个题是求两个有序数组的中间数,其实这个中间数,如果是奇数,就是中间的那个数,如果是偶数,就是中间的两个数的和的平均值。
There are two sorted arrays A and B of size mand n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
这个题是求两个有序数组的中间数,其实这个中间数,如果是奇数,就是中间的那个数,如果是偶数,就是中间的两个数的和的平均值。
应用推荐