Binary search tree
Age 17 · Technology
A binary search tree keeps smaller keys in the left subtree and larger keys in the right subtree. A search starts at the root and moves left or right after each comparison.
This picture is part of the full library
Every lesson is open to everyone for 7 days after it is published. This one came out on October 12, 2026: its text stays readable here, and its picture opens with a subscription.
The app is free. A subscription opens every lesson, in every school year.
In the picture
- Root disc: the first key compared
- Left thread: the search moves left because the target key is smaller
- Left child disc: the next key compared
- Lower-left disc: a leaf key at the end of the glowing trail
Examples
- Looking up a word in a printed dictionary
- Following choices in a video-game skill tree
Key takeaways
- Each comparison discards one whole side of the tree
- Search time depends on the tree’s height
Quiz: Binary search tree (Age 17)
-
In a binary search tree, where are keys smaller than a node found?
-
During a binary search tree search, what determines whether you move left or right after comparing the target with a node?
-
What does each comparison discard during a binary search tree search?
The answers, each with its explanation, are in the app. This lesson has left the free week, so its quiz is part of the subscription.
Free app, optional subscription
App Store Google Play
Carry on in the app
At least one new illustrated lesson every weekday for your child’s year, with its quiz and a reminder at 6:15 pm.
Your child’s teacher does not use My Enhanced Teacher yet?
Tell them about it