Interval problems involve working with ranges defined by start and end points. Common operations include merging overlapping intervals, inserting new intervals, and finding intersections. The key insight is usually to sort intervals by start time and process them sequentially.
Sort intervals by start time. Overlapping intervals have the property that the next interval starts before the current one ends.
Two intervals [a,b] and [c,d] overlap if and only if a <= d AND c <= b. After sorting, just check if next.start <= current.end.
Sort by start time, iterate through intervals, and either merge overlapping intervals or count conflicts based on the problem requirements.