Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 4. Median of Two Sorted Arrays
Find the median of two sorted arrays in O(log(m+n)) time by using binary search to partition the arrays so the left half contains the correct count of smaller elements and all left elements ≤ all right elements. The challenge is doing this efficiently without merging and handling unequal lengths and edge boundaries.
Asked at:
Microsoft
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early April, 2025
Meta
Senior
Late January, 2025
Microsoft
Intern
Median of two sorted arrays
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.