Merge Intervals

Given a collection of intervals, merge all overlapping intervals and return the result sorted by start.

Examples
Input: [[1,3],[2,6],[8,10],[15,18]]
Output: [[1,6],[8,10],[15,18]]
Hints
Related Problems

Merge Intervals

Given a collection of intervals, merge all overlapping intervals and return the result sorted by start.