Given two sorted arrays, find the median of the combined sorted sequence in logarithmic time. This is the canonical hard selection problem where a binary search over partition positions is optimal.
nums1 and nums2 = sorted arrays
median of the combined sorted arrays
Example 1:
Input:
nums1 = [1,3] nums2 = [2]
Output:
2.0
Explanation:
The combined sorted sequence is [1,2,3].
Example 2:
Input:
nums1 = [1,2] nums2 = [3,4]
Output:
2.5
Explanation:
The combined sorted sequence is [1,2,3,4].