Learn
Practice
Newsletter
Resources
Resume
New
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
The Skyline Problem
Bookmark
Input
Standard
Simple
Single
Nested
Custom
buildings
=
[[2,9,10],[3,7,15],[5,12,12],[15,20,10],[19,24,8]]
2
4
6
8
10
12
14
16
18
20
22
24
0
3
6
9
12
15
h=10
h=15
h=12
h=10
h=8
Heights: {0: 1}
prevMax: 0 | currentMax: 0
Result:
[]
algo
master
.
io
Step:
Find the skyline outline from building silhouettes
0 / 44
Input
Standard
Simple
Single
Nested
Custom
buildings
=
[[2,9,10],[3,7,15],[5,12,12],[15,20,10],[19,24,8]]
0 / 44
2
4
6
8
10
12
14
16
18
20
22
24
0
3
6
9
12
15
h=10
h=15
h=12
h=10
h=8
Heights: {0: 1}
prevMax: 0 | currentMax: 0
Result:
[]
algo
master
.
io
Step:
Find the skyline outline from building silhouettes