Given two sorted arrays nums1
and nums2
of size
m
and n
respectively, return
the median of the two sorted arrays.
[[1, 3], [2]]
2.0
[[1, 2], [3, 4]]
2.5
[[0, 0], [0, 0]]
0.0
[[2], []]
2.0
[[1, 2, 5], [3, 4]]
3.0
nums1.length == m
nums2.length == n
0 <= m <= 1000
0 <= n <= 1000
1 <= m + n <= 2000
-106 <= nums1[i], nums2[i] <= 106