Binary Tree
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 has nothing to its left, so it is written down first.
What you will see
ROOT at the top, LEFT and RIGHT children below; depth and height counted visibly.
Cost
| traverse | O(n) |
|---|---|
| height | O(n) |
| Space | O(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.
Before this
Leads to
Topics that need this one first.
Taught by the same lesson
Tree Traversals covers these too, in the same run.