← Back to Gallery

Binary Tree Traversal

Algorithm Pre-order (DFS)
Nodes 15
Visited 0
Stack/Queue Size 0
Click 'Start' to begin traversal
Traversal order: -

Visualizes four classic tree traversal algorithms. Pre-order, In-order, and Post-order use recursive depth-first approach. Level-order uses a queue for breadth-first traversal.

Unvisited
Current / Processing
Visited
In Stack/Queue