← Morgan Stanley questions
CodingMedium

Merge Overlapping Intervals

Filed under Morgan Stanley · Also reported at Airtel, Apple, Bloomberg, HashedIn, Infinera, Innovites, JPMorgan Chase, McKinsey and 6 more

Given an array of intervals, merge all overlapping intervals and return an array of the non-overlapping intervals that cover all intervals in the input.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Morgan Stanley questions

Collected from public candidate posts and coding forums. Updated Nov 2026.