call(back)
Algorithms & Data Structuresmedium

Merge Overlapping Intervals

Given a list of intervals [start, end], merge all overlapping intervals and return the result sorted by start time.

Follow-up: how would you handle a stream of intervals that arrive out of order?

Asked at