Boundary Traversal of Binary Tree

Tree Shape Presets

Traversal Result

Awaiting traversal simulation...

Traversal Stages

Root Node Pending
Left Boundary Pending
Leaf Nodes (L to R) Pending
Right Boundary Pending

Build Your Custom Tree!
Click any node on the tree diagram to modify its numeric value, add left/right children, or delete elements.

Traversal Formula

Traversal traces anti-clockwise:
1. Root node
2. Left boundary (down left-child or right-child if left-child is absent; excludes leaf nodes)
3. Leaves from left-to-right
4. Right boundary in reverse (bottom-up stack structure)

Live Console Log

Waiting for actions...