Merge template
Sort by start. If current starts before last end, extend end; else push a new interval.
Lesson
Sort and sweep overlapping ranges.
Loading solution…
Sort by start. If current starts before last end, extend end; else push a new interval.
Meeting rooms II: sort starts, keep a min-heap of end times; heap size is rooms in use.
Showing 24 of the related problems in the 1000-question bank.
Merge Intervals
Intervals
Insert Interval
Intervals
Non-overlapping Intervals
Greedy
My Calendar I — Practice 24
Intervals
Minimum Arrow Shots Drill — Practice 26
Intervals
Meeting Rooms — Practice 29
Intervals
My Calendar II — Practice 31
Intervals
Video Stitching — Practice 33
Intervals
Meeting Rooms II — Practice 36
Intervals
Car Pooling — Practice 38
Intervals
Employee Free Time — Practice 40
Intervals
My Calendar I — Practice 43
Intervals
Minimum Arrow Shots Drill — Practice 45
Intervals
Meeting Rooms — Practice 48
Intervals
My Calendar II — Practice 50
Intervals
Video Stitching — Practice 52
Intervals
Meeting Rooms II — Practice 55
Intervals
Car Pooling — Practice 57
Intervals
Employee Free Time — Practice 59
Intervals
My Calendar I — Practice 62
Intervals
Minimum Arrow Shots Drill — Practice 64
Intervals
Meeting Rooms — Practice 67
Intervals
My Calendar II — Practice 69
Intervals
Video Stitching — Practice 71
Intervals
Got the lesson?
Mark Intervals as understood when the ideas stick.