Merge Intervals
Sort intervals by start, then compare each interval with the current merged tail. Extend the tail end when ranges overlap; otherwise append a new interval.
Merge all overlapping intervals and return the condensed list.
Tagged with intervals
Sort intervals by start, then compare each interval with the current merged tail. Extend the tail end when ranges overlap; otherwise append a new interval.
Merge all overlapping intervals and return the condensed list.