AlgoScope

Binary Tree

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

Data structures, data structure, beginner
A binary search tree with 7 nodes. Walking it in inorder order, which visits left subtree, then the node, then the right subtree.20304050607080
A binary search tree with 7 nodes. Walking it in inorder order, which visits left subtree, then the node, then the right subtree.20304050607080

Tree Traversals: Inorder comes out sorted

Start, step 1 of 9

Walk this tree in inorder order: left subtree, then the node, then the right subtree.

Cost

Traverse
O(n)
Height
O(n)
Space
O(n)

Leads to

Topics that need this one first.

Taught by the same lesson

Tree Traversals covers these too, in the same run.