Unvisited
Current element
In stack
NGE found
No NGE (-1)

Controls

Time: O(n) | Space: O(n)

Steps

0 steps

Press Run to trace the algorithm one step at a time.