Merge Intervals
merge-intervals
Practice Problems
Insert Interval
Given a set of non-overlapping intervals sorted by start time and a new interval, insert the new interval and merge if necessary.
Merge Intervals
Given an array of intervals, merge all overlapping intervals and return an array of the non-overlapping intervals that cover all the intervals in the input.
Minimum Arrows to Burst Balloons
Given balloons represented as horizontal intervals, find the minimum number of vertical arrows needed to burst all balloons.
Non-overlapping Intervals
Given an array of intervals, return the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping.
Question Banks
Intervals and Merge Problems
Six harder prompts on sorting intervals, sweep-line counts, overlap detection, and meeting-room scheduling. Code-anchored interview prep.
