leetcode4 寻找两个正序数组的中位数【困难难度】
英文题目: Median of two sorted arrays
输入:nums1 = [1,3], nums2 = [2]
输出:2.00000
解释:合并数组 = [1,2,3] ,中位数 2输入:nums1 = [1,2], nums2 = [3,4]
输出:2.50000
解释:合并数组 = [1,2,3,4] ,中位数 (2 + 3) / 2 = 2.5输入:nums1 = [0,0], nums2 = [0,0]
输出:0.00000输入:nums1 = [], nums2 = [1]
输出:1.00000思路
已AC的C++代码:
最后更新于