- We don't need to check any point, we only need to focus on the start and end of intervals
- Split the start point and end point of each intervals (also use additional information to identify start points and end points).
- Sort the points based on position and types of points (or store points into priority queue).
- Scan the points by order.
- Find intersections of intervals
- 1D
- Merge Overlapping Intervals (LC56)
- Check Intervals Have Overlapping (LC252 Meeting Rooms)
- Maximum Number of Overlapping Intervals (LC253 Meeting Rooms II)
- Remove Intervals for Non-overlapping (LC435)
- Merge K Interval Lists And Find Gaps (LC759)
- Intersect 2 Interval Lists to Find First Intersection (LC1229) (Find first intersection with duration limitation)
- Remove Covered Intervals
- Minimum Number of Non-Overlapping Intervals
- 57 Insert Interval
- 352 Data Stream as Disjoint Intervals
- 370 Range Addition (medium)
- 646 Maximum Length of Pair Chain
- 731 My Calendar II (medium)
- 732 My Calendar III (medium)
- 1272 Remove Interval
- 1326 Minimum Number of Taps to Open to Water a Garden (hard)
- 1353 Maximum Number of Events That Can Be Attended
- 1589 Maximum Sum Obtained of Any Permutation (medium)
- 1674 Minimum Moves to Make Array Complementary (medium)
- 1851 Minimum Interval to Include Each Query (hard)
- 1854 Maximum Population Year (easy)
- 1893 Check if All the Integers in a Range Are Covered (easy)
- 1943 Describe the Painting (medium)
- 2158 Amount of New Area Painted Each Day (hard)
- 2237 Count Positions on Street With Required Brightness (medium)
- 2251 Number of Flowers in Full Bloom (hard)
- 2848 Points That Intersect With Cars (easy)
- 2D
- 218 The Skyline Problem
- 391 Perfect Rectangle
- 850 Rectangle Area II