What is Merge Intervals
Sort intervals by start, then merge overlaps into clean ranges — like combining meeting blocks on a calendar. If the next start is at or before the last merged end, extend that block. Otherwise start a new one.
next.start ≤ last.end — then last.end = max(last.end, next.end). Touching edges usually merge.Approach
Visualization & Algorithm Execution
-
[]
Implementation