IB Computer Science HL
Lesson 1: Introduction, Logic & Terminology
Explore foundational tree concepts, terminology, and BST properties through classroom-ready activities.
(20 minutes)
Let's build a tree using people! We'll use this to learn the core terminology.
How can we describe a tree? "A tree is a root node, connected to a left subtree and a right subtree."
A subtree is just a smaller tree. The structure is defined in terms of itself!
(15 minutes)
Hover over the "flash cards" to see the definition and highlight the corresponding part of the tree!
The single top-most node of the tree. (A)
Any node that has at least one child. (A, B)
A node connected directly below a parent. (B, C, D, E)
A node with no children. (C, D, E)
A parent node and all of its descendants. (The tree starting from B)
(25 minutes)
Start at the root. If the new number is LESS THAN the node, go LEFT.
If it's GREATER THAN, go RIGHT.
Repeat until you find an empty spot!
In your groups, add these numbers one by one using your cups:
Final Result:
(10 minutes)
Using the tree diagram, complete the following tasks:
Next lesson, we will learn how to walk through these trees and modify them.