TweakCode
Optimization lessons
Loading editor…
Test casesRun to compare output
Input
intervals = [[1,3],[2,6],[8,10],[15,18]]
Output
—
Expected
[[1,6],[8,10],[15,18]]

More practice

Same technique, different problems. Try them without the walkthrough.