Depth-first search on a seven-node graph with cycles. Press Play to dive deep, backtrack, and discover back edges.
Graph · DFS · recursive · stack
unseen
on stack
active
finished
tree edge
back edge
Call stack (top first)
empty
Step 0 / 0
Press Play. DFS dives as deep as it can down one branch, then backtracks. An edge to a node still on the stack is a back edge — a cycle.
Start
Speed
timeline0 / 0
←→space walk steps