PlayBox

DFS Visualizer

Step through depth-first traversal on a sample graph using an explicit stack.

Enter a node from A to G
ABCDEFG

Current step

DFS initialized from A.

Stack

A

Traversal order

No nodes visited yet

Adjacency list

AB, D
BA, C, E
CB, F
DA, E
EB, D, F, G
FC, E
GE