Each outcome is backed by the checks that test it. Solid means every check was right first time; with hints means you got there with a nudge; worth a revisit means an answer was revealed or is still wrong.
1
Say what a binary tree is and why it is useful, and find the root, parents and children on a drawing.
Not yet
2
Find the leaves and subtrees of a tree, count depth and height, and write a tree in code.
Not yet
3
Follow a recursive walk with the call stack beside it, and say why every node is visited exactly once.
Not yet
4
Write out the preorder, inorder and postorder of a small tree, and say what each one is for.
Not yet
5
Follow level order with a queue, and say why first in, first out gives one level at a time.
Not yet
6
Work out a tree's size, height, largest value or path sum by trusting the smaller calls.
Not yet
7
Say what Python and Java give you for trees, when recursion goes too deep, and how to walk a tree without it.
Not yet
Your cheat sheet
What each lesson leaves you able to do, in one place. Lessons you have not finished are dimmed, not hidden.
Work out size, height and the largest value in three moves: ask the left subtree, ask the right subtree, combine the answers with this node.
Choose the base case that makes the combining step come out right: 0 for size, −1 for height, and the smallest possible value for the largest value (minus infinity in Python, Integer.MIN_VALUE in Java).
Explain why you can trust the recursive call: it is the same function on a smaller tree.
Say that neither standard library has a binary tree class you shape yourself, and name where trees turn up anyway: documents, source code and file systems.
Explain why Java's TreeMap is not a tree you can walk, and what Python offers when you need order.
Say when a recursive walk runs out of stack, and replace it with your own stack of nodes.