一、題目
原題鏈接:https://leetcode.com/problems/median-of-two-sorted-arrays/description/
難度等級:困難
There are two sorted arrays nums1 and nums2 of size m and n respectively.
Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
Example 1:
nums1 = [1, 3]
nums2 = [2]
The median is 2.0
Example 2:
nums1 = [1, 2]
nums2 = [3, 4]The median is (2 + 3)/2 = 2.5
題目翻譯:
有兩個大小爲 m 和 n 的排序數組 nums1 和 nums2 。
請找出兩個排序數組的中位數並且總的運行時間複雜度爲 O(log (m+n))
二、解題方案
(待完善。。。)