05.07 · Problem
Median of Two Sorted Arrays
This problem is part of solulu Pro
Given two sorted arrays nums1 (size m) and nums2 (size n), return the median of all their elements combined, in O(log(m + n)) time. (For an even count, the median is the average of the two middle values.)
Lifetime ₹1,999 ₹999 · Launch offer
Item 34 of 150 · updated 2026-10-12