Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
Number of Visible People in a Queue
Bookmark
Input
Example 1
Example 2
Example 3
Custom
heights
=
[10, 6, 8, 5, 11, 9]
queue
10
6
8
5
11
9
0
1
2
3
4
5
result
stack
(empty)
how many people to the right can each person see?
algo
master
.
io
Step:
Start of algorithm
0 / 32
Input
Example 1
Example 2
Example 3
Custom
heights
=
[10, 6, 8, 5, 11, 9]
0 / 32
queue
10
6
8
5
11
9
0
1
2
3
4
5
result
stack
(empty)
how many people to the right can each person see?
algo
master
.
io
Step:
Start of algorithm