Last Minute Notes
Github
Docs
Learn
Search
⌘
K
@sayanstwt
Lessons
Learn
/
Data Structures & Algorithms
/
Arrays & Strings
Merge Intervals
7 min
Beginner
8 steps
Sort by start, then merge or insert in one sweep.
Intervals
1
Overlaps
0
Goal
merge them
0
5
10
15
20
#1
[1, 3]
normal
slow / failed
marker
In this lesson
Step 1 of 8
1
The problem
2
Six cases
3
One test
4
Merge run
5
Keep max
6
Insert
7
Why sort
8
Recap