Course · Section 11: Working With Arrays · Lecture 172: Sorting Arrays
Given `intervals` as an array of `[start, end]` pairs, implement `merge(intervals)` returning the non-overlapping intervals after merging overlaps, sorted by start.
+ 1 hidden test run on Submit.
Sorting by start then merging overlapping ends gives the result in O(n log n) time.
Run your code to see results.