Median of Two Sorted Arrays

Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.

Sample Input 1
[[1, 3], [2]]
Sample Output 1
2.0
Sample Input 2
[[1, 2], [3, 4]]
Sample Output 2
2.5
Sample Input 3
[[0, 0], [0, 0]]
Sample Output 3
0.0
Sample Input 4
[[2], []]
Sample Output 4
2.0
Sample Input 5
[[1, 2, 5], [3, 4]]
Sample Output 5
3.0
Time Limit

1.0 seconds

Memory Limit

256 KB

Constraints