Skip to content
TryAlgoViz
Algorithms
Articles
CS Fundamentals
Problems
Roadmap
Dashboard
Theme
Online Stock Span — TryAlgoViz
Online Stock Span
medium
Visualize
Description
Hints
Discussion
Visual examples
Example 1
Input
100
0
80
1
60
2
70
3
60
4
75
5
85
6
Output
[null,1,1,1,2,1,4,6]
Python
Reset
Run
Ctrl+Enter
Loading editor…
Test Case 1
Input
100
0
80
1
60
2
70
3
60
4
75
5
85
6
Visualize
Expected Output
[null,1,1,1,2,1,4,6]