Blind 75 Interval Questions
5 problems · Free practice
Interval problems are often solved by sorting first, but the sort key depends on the goal. Merging follows start order; choosing the most non-overlapping intervals uses earliest finish time. Scheduling also requires an explicit convention for endpoints: a meeting ending when another begins typically does not overlap it.
Practice intervals
Insert Interval
MediumInsert a closed interval into a list of closed intervals already sorted by start and mutually non-overlapping. Merge overlaps and return a sorted result. Touching endpoints overlap.
Merge Intervals
MediumMerge all overlapping closed intervals from an unsorted list and return a list sorted by start. Intervals touching at an endpoint should merge.
Non-overlapping Intervals
MediumRemove the fewest intervals so the remaining intervals never overlap. Here an interval ending at time t does not conflict with one starting at t. Each interval has start < end.
Meeting Rooms
EasyGiven meeting intervals with start < end, determine whether one person can attend every meeting. A meeting ending when another begins is allowed.
Meeting Rooms II
MediumFind the minimum rooms needed for meeting intervals with start < end. A room becomes reusable at the meeting’s end time.
What to focus on
- State whether touching endpoints count as an overlap for this problem.
- Separate the current merged interval from the output already finalized.
- Test nested intervals, equal endpoints, and an interval that spans several others.