CodeMosa
Master LeetCode Patterns
All Patterns
Collections
Sign In
Back
Sweep Line
Question 1 of 12
8% Complete
Medium
To find the maximum number of overlapping intervals, what's the sweep line approach?
A
Create events for start (+1) and end (-1), sort by time, track running count
B
Sort intervals and use two pointers
C
Use a heap to track active intervals
D
Check every pair of intervals
Need a hint?
Think about events at interval boundaries