← Quiz: Binary Search Tree Operations: all 15 questions
Quiz: Binary Search Tree Operations · Question 1 of 15
In a binary search tree, which statement is always true for every node?
In a binary search tree, which statement is always true for every node?
- A.The left child is smaller and the right child is larger, but deeper nodes can be anything
- B.All keys are stored in the leaves
- C.Every key in its left subtree is smaller and every key in its right subtree is larger
- D.The tree is always balanced
Answer & explanation
Correct answer: Every key in its left subtree is smaller and every key in its right subtree is larger
The rule applies to whole subtrees, not just the direct children. That is why validating needs a range.
Can you get the rest right without peeking?
Take the timed Quiz: Binary Search Tree Operations quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →