Home
Topic
intervals
1 article

Merge Intervals Pattern: Solve Scheduling Problems with Sort and Sweep
TLDR: Sort intervals by start time, then sweep left-to-right and merge any interval whose start ⤠the current running end. O(n log n) time, O(n) space. One pattern ā three interview problems solved. š When Two Meetings Overlap: The Scheduling Prob...
ā¢13 min read
