cs.thefarshad
medium Intervals

Merge Intervals

Given `intervals` where each element is [start, end], merge all overlapping intervals and return them sorted by start. Example: [[1, 3], [2, 6], [8, 10], [15, 18]] → [[1, 6], [8, 10], [15, 18]].

runs in your browser