Unvisited
Current
Backtracking
Visited

Controls

Click cells to toggle walls.

Time: O(V+E) | Space: O(V)

Stack

0 steps

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