Interview Guides

Given a list of intervals intervals, where each interval is a pair [start, end] with start <= end, return a new list of intervals after merging all overlapping intervals. The output should contain the smallest possible set of non-overlapping intervals covering the same ranges.