Code
The highlighted line runs next. The pill shows the live values in the running call.
Variables
The data structures the code is building
Number line
One row per input interval; merged blocks below
Given an array of intervals (in any order), merge all overlapping intervals and return the non-overlapping intervals that cover them. Intervals that share a point, like [1,2] and [2,3], overlap.
The highlighted line runs next. The pill shows the live values in the running call.
The data structures the code is building
One row per input interval; merged blocks below
n = len(intervals). The highlighted row is the solution being traced.
Keyboard: ← → step, Space play or pause. 1 to 8 intervals with values from 0 to 40, written as JSON.