Given two sorted arrays nums1 and nums2, return the median of the two sorted arrays. The solution must use binary search to achieve an overall run time complexity of O(log(min(m,n))), where m and n are the lengths of nums1 and nums2 respectively.
Input: nums1 = [1,3], nums2 = [2]
Output: 2.0
Explanation: The merged array is [1,2,3] and the median is 2.
Input: nums1 = [1,2], nums2 = [3,4]
Output: 2.5
Explanation: The merged array is [1,2,3,4] and the median is (2+3)/2 = 2.5.
Input: nums1 = [0,0], nums2 = [0,0]
Output: 0.0
Explanation: The merged array consists of all zeros, so the median is 0.0.
Your notes are automatically saved in your browser's local storage and will persist across sessions on this device.