The key insight: if you sort intervals by start time, overlapping intervals become adjacent. Then you can merge them in one pass.
Sort intervals by their start value.
Initialize result with the first interval.
For each subsequent interval, check if it overlaps with the last interval in result.
If overlap (current start last end), merge by updating last end to (last end, current end).
Otherwise, add current interval to result.