Description
https://leetcode.com/problems/merge-intervals/description/
Solution
The key point here is to sort all the intervals, then we add each interval by order to merge(insert) into the new intervals.
1 | # Definition for an interval. |
Why don't you come to your senses?
https://leetcode.com/problems/merge-intervals/description/
The key point here is to sort all the intervals, then we add each interval by order to merge(insert) into the new intervals.
1 | # Definition for an interval. |