Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What is a successor in a binary search tree?
Look for the next node in sorted order.
Which function would you use to find the predecessor?
Remember the left child holds smaller values.
What is the successor of a node with value 4 if the right subtree is 6, 7, 8?
Look for the minimal value in the right part.
The predecessor of the maximum node in the tree is always:
Consider the characteristics of the largest node.
You have a binary search tree with nodes 10, 5, 15, and 12. Determine the successor of 10 and explain your reasoning.
Look for the smallest node greater than 10.
In a tree, a node 6 has children 4 and 8. Determine the predecessor of node 6 and explain your reasoning.
Find the rightmost child of the left subtree.
5 more questions in this section. Enroll free to practise them all.
Enroll free