solulubeta
Sign in
NeetCode 150 / Binary Search
05.07 · Problem

Median of Two Sorted Arrays

Hard Binary search on the partition 1 video LC 4 Pro

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
Mark this problem as solved when you are finished.

Item 34 of 150 · updated 2026-10-12