Find the median of two sorted arrays.
Example 1
Input: nums1 = [1,2], nums2 = [3,4]
Output: 2.5
Explanation: The median of the merged array is 2.5.
Output: 2.5
Explanation: The median of the merged array is 2.5.
Example 2
Input: nums1 = [1,3], nums2 = [2]
Output: 2
Explanation: The merged array [1,2,3] has median 2.
Output: 2
Explanation: The merged array [1,2,3] has median 2.