← 返回 amazon 的题目列表Merge Overlapping Time Intervals in Ascending Order
类型:online_judge
amazon
Given multiple time intervals, each interval is represented as [start, end] where start < end. Merge all overlapping time intervals and return them in ascending order of their start times.
Example
Input: [[7, 7], [2, 7], [6, 11], [11, 12]] Output: [[2, 12]]
Constraints
The number of time intervals is between [1, 10^5].
0 <= start < end <= 10^9.
Example
Input
[[7, 7], [2, 7], [6, 11], [11, 12]]