

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 7
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
Some of the simpler BST algorithms are the get_min and get_max methods.
Now that we can add users to our BST, our systems team wants us to start implementing search functionality.
Implement the get_min and get_max methods. They should return the minimum and maximum values in the BST respectively.
get_min function loops through all the left child nodes and returns the value of the last one.get_max function does the same for the right children.