Median of Two Sorted ArraysHard

array binary search divide and conquer

Find the median of two already-sorted arrays nums1 and nums2 without fully merging them. Two approaches — the O(m+n) merge baseline, and the optimal O(log min(m,n)) partition search.

Press play to watch the algorithm run.
Metrics
Legend
How it works
0 / 0