Merge Intervals

Problem

Given a collection of intervals, merge all overlapping intervals and return the non-overlapping set covering the same ranges.

Example

[[1,3],[2,6],[8,10]] -> [[1,6],[8,10]]

Constraints

  • 1 ≤ n ≤ 10^4
added …
LeaderboardSalaryAccount