Merge Intervals
Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input.
Merge Intervals

Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input.

Example 1:
Input: [[1,3],[2,6],[8,10],[15,18]]
Output: [[1,6],[8,10],[15,18]]
Input
arr =[[1,3],[2,6],[8,10],[15,18]]

Start

[1,3]
[2,6]
[8,10]
[15,18]
Prev End
-Inf
Removed Count
0
Variables
No variables to display
DepthFunction Call
Stack empty
0/12