

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: Trees
incomplete
2: Binary Trees
incomplete
3: Insert Nodes
incomplete
4: Insert Review
incomplete
5: Min and Max
incomplete
6: Delete
incomplete
7: Deletion Review
incomplete
8: Preorder Traversal
incomplete
9: Postorder Traversal
incomplete
10: Inorder Traversal
incomplete
11: Node Exists
incomplete
12: Height
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Trees aren't particularly useful data structures unless they're ordered in some way. One of the most common types of ordered tree is a Binary Search Tree or BST.
A binary tree node has at most 2 children. A BST adds a few more constraints:
The left child's value must be less than its parent's value
The right child's value must be greater than its parent's value
No two nodes in the BST can have the same value
By ordering the tree like this, we can traverse the tree to find the node we want much faster.