Non-overlapping Intervals
Merge Intervals
Problem
Given a collection of intervals, find the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping.
For example:
Thought Process
Sort the intervals by their start time. If two intervals overlap, the interval with larger end time will be removed so as to have as little impact on subsequent intervals as possible.
Solution
Last updated
Was this helpful?