Home My space log
Language EN (English)

Binary search trees

ages 11-13 45 minestimate Screen-free lesson

Children walk through a large tree drawn on the ground, turning over nodes, and learn how a binary search tree stores things so they are quick to find.

Steps

  1. Remind the class how binary search works on a sorted list.
  2. Show the tree: lines to follow and nodes with hidden numbers underneath.
  3. Pick a target. The child starts at the top node and turns it over.
  4. If the target is smaller, go left. If it is bigger, go right. Repeat until you find it.
  5. Let children arrange new numbers into their own tree shapes.
  6. Compare how many nodes you visit with searching a list.

Talk about it

  • Does the shape of the tree change the search?
  • How is this different from binary search on a list?
  • Where could a computer use a tree?

CC BY-SA 4.0

Adapted from CS Unplugged by the University of Canterbury Computer Science Education Research Group (CS Unplugged), licensed CC BY-SA 4.0.

Original lesson, with pictures · License: CC BY-SA 4.0

There are no pictures here. The original lesson has the pictures and printables.

Changes made: Simplified, shortened and translated by Open Cosmos with AI

This adapted lesson is shared under the same license (CC BY-SA 4.0).