Which statement is correct regarding binary search tree? I. The value at node…
2021
Which statement is correct regarding binary search tree?
I. The value at node N is less than every value in the left subtree of node.
II. The value at node N is greater than or equal to every value in the right subtree of N.
- A.
Only I
- B.
Only II
- C.
Both I and II
- D.
Neither I nor II
Attempted by 250 students.
Show answer & explanation
Correct answer: D
In a Binary Search Tree (BST), every node N must be greater than all values in its left subtree and less than all values in its right subtree. Statement I is false because it reverses this relationship for the left subtree. Statement II is false because BST definitions typically require strict inequality, not allowing equality in the right subtree.