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 the minimum value in a BST with root 10, left child 5, and left child 2?
Look for the leftmost node.
What is the maximum value in a BST with root 15 and right child 20?
Follow the right child till you cannot go further.
What is the minimum value in a BST that has the following nodes: 10, 5, 3, 1?
Always look left to find the minimum.
True or False: A node's successor can only be found in its right subtree.
Consider the conditions under which a successor exists.
Consider a BST structured with values: 10, 6, 15, 3, 8, 12, 18. Find the successor and predecessor of the value 10.
Use tree traversal techniques discussed to explore each side.
Write an algorithm to find the minimum and maximum values in a BST with nodes inserted in random order. Call your algorithm on a sample BST.
Follow the path based on node directions to fetch limited value ranges.
5 more questions in this section. Enroll free to practise them all.
Enroll free