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 happens if you try to insert a duplicate value into a search tree?
Think about maintaining the uniqueness in a search tree.
Can a search tree be empty? If so, what happens when a value is inserted?
Consider the starting point of tree structure.
What do you do if you try to insert a value that is already in the tree?
Think about the uniqueness of nodes in a tree.
True or False: When inserting into a search tree, you need to always find an empty place to insert.
Insertion requires finding a proper place.
You are given a tree with values [30, 20, 40]. Write down the structure after inserting the value 25.
Trace the insertion path carefully to locate where 25 fits.
If the insertion sequence is [50, 30, 70, 30, 10, 90], what will be the final structure of the tree?
Count how often a number repeats to understand the handling of duplicates.
5 more questions in this section. Enroll free to practise them all.
Enroll free