[LeetCode in C] - 4.Median of Two Sorted Arrays
一、题意
给定长度分别为n和m的递增数组nums1和nums2。在O(log (m+n))时间内找到两个数组的中位数。两个数组均不能为空。
例1:
nums1 = [1, 3] nums2 = [2]
The median is 2.0
例2:
nums1 = [1, 2] nums2 = [3, 4]
The median is (2 + 3)/2 = 2.5
二、思路
首...
翻译
2019-03-02 11:28:16 ·
199 阅读 ·
0 评论