Mental Model
Intervals represent ranges of values that often overlap or need merging, making them a common pattern in problems involving scheduling or grouping.
Analogy: Imagine booking meeting rooms where each meeting has a start and end time; you need to see which meetings overlap or fit together without conflict.
Time line: 0 1 2 3 4 5 6 7 8 |----|----|----|----|----|----|----|----| Interval A: [====] Interval B: [=======] Interval C: [==]
