...

/

Solution: Median of Two Sorted Arrays

Solution: Median of Two Sorted Arrays

Let’s solve the Median of Two Sorted Arrays problem using the Modified Binary Search pattern.

Statement

You’re given two sorted integer arrays, nums1 and nums2, of size mm and nn, respectively. Your task is to return the median of the two sorted arrays.

The overall run time complexity should be O(log(m,n))O(\log (m, n)).

Constraints:

  • nums1.length =m= m

  • nums2.length =n= n

  • 0m10000 \leq m \leq 1000 ...