Learn practical skills, build real-world projects, and advance your career

4. median-of-two-sorted-arrays

Use the "Run" button to execute the code.

!pip install jovian --upgrade --quiet
import jovian

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

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

test cases

  1. median of even number length
  2. median of odd number length
  3. empty list as 1 input
  4. list as both inputs