Visualization step 1 of 8. VISIT.
State
Vvisit
Step 1 / 8A activeQ queuedOK doneX discarded
Array Visualization
4
0
1
1
2
2
|
3
1
4
3
5
4
6
2
7
Step 1 / 8
Step 1 of 8. VISIT. Scan the search array (right side) with a decreasing stack to precompute each value's next greater neighbor.
Step Explanation1 / 8
VISIT
Scan the search array (right side) with a decreasing stack to precompute each value's next greater neighbor.
Output0 results