Glossary term
What is sweep line? Meaning for developers
Sort the starts and ends (the events) and scan once, while you track how many intervals are active.
Learn it properly · DSALesson 48: Interval ProblemsSort by start time, then merge, insert and count overlapping intervals.