AlgoScope

Binary Tree

Data structurebeginnerTrees

Each node has at most two children. Every tree lesson here builds on this shape.

Decision · step 2 of 9Tree Traversals: Inorder comes out sorted
20✓304050607080current

20 has nothing to its left, so it is written down first.

Open in the player →or start at step 2

What you will see

ROOT at the top, LEFT and RIGHT children below; depth and height counted visibly.

How tree traversals works →

Cost

traverseO(n)
heightO(n)
SpaceO(n)

How you work with it here

play it through, step one change at a time, scrub to any step, run it on your own input, try operations in any order.

Screen readers: Each element is an accessibility element with position, value and state; structural changes are announced per step.

Reduced motion: Elements appear at their destination with a crossfade; no travel longer than the element's own size.