Merge Intervals
viaLeetCode
Given an array of intervals where intervals[i] = [start, end], merge all overlapping intervals and return an array of the non-overlapping intervals that cover all the input intervals. A common follow-up variation is inserting a new interval into a sorted set of intervals.
asked …