TweakCode
Optimization lessons
Loading editor…
Test casesRun to compare output
Input
intervals = [[1,3],[6,9]], newInterval = [2,5]
Output
—
Expected
[[1,5],[6,9]]

More practice

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