Problem Description
Given a collection of intervals, merge all overlapping intervals.
1 <= Total number of intervals <= 100000.
First argument is a list of intervals.
Return the sorted list of intervals after merging all the overlapping intervals.
Input 1:
[1,3],[2,6],[8,10],[15,18]
Output 1:
[1,6],[8,10],[15,18]
Explanation 1:
Merge intervals [1,3] and [2,6] -> [1,6]. so, the required answer after merging is [1,6],[8,10],[15,18]. No more overlapping intervals present.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.