The Find Maximal Uncovered Ranges interview question gives you a total range and a list of sub-intervals that are "covered." You need to find all parts of the range that are not covered by any of the given intervals. The output should be a list of these missing intervals, sorted by their start points.
Meta use this to test proficiency with Interval and Sorting interview patterns. It’s a practical problem related to memory management (finding free blocks), scheduling (finding empty time slots), and graphics. It evaluation your ability to handle overlapping intervals and correctly identify the gaps between them.
This is an Interval Merging and Complement problem.
Total range [0, 10]. Covered: [[1, 2], [5, 8], [2, 3]]
[[1, 2], [2, 3], [5, 8]].[[1, 3], [5, 8]].[[0, 0], [4, 4], [9, 10]].Always handle interval problems by sorting by start time first. It turns a chaotic set of ranges into an ordered sequence where you only need to compare the "current end" with the "next start."
| Title | Difficulty | Topics | LeetCode |
|---|---|---|---|
| Remove Covered Intervals | Medium | Solve | |
| Sort the Jumbled Numbers | Medium | Solve | |
| Merge Intervals | Medium | Solve | |
| Check if Grid can be Cut into Sections | Medium | Solve | |
| Count Days Without Meetings | Medium | Solve |