Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What should you do if you want to insert a value into an empty search tree?
Think about what the starting point of a tree might be.
Can you insert a duplicate value into a search tree?
Consider how duplicates might affect order.
What should you do when inserting a value that is already present in the tree?
Think about how a duplicate might affect the tree structure.
True or False: Inserting into an empty search tree requires creating a new root node.
Consider the definition of what a tree's root is.
Given the following tree with values [15, 10, 20, 8, 12, 18, 25], what will it look like after inserting the value 17?
Draw the tree and visualize the path driven by comparisons.
If you have a skewed tree where every node only has a right child, what would the structure look like after inserting the value that should be its left child?
Consider how balancing might take effect in real scenarios.
5 more questions in this section. Enroll free to practise them all.
Enroll free