Which of the following statement(s) is/are TRUE for any binary search tree (BST) having distinct integers?
GATE CSE 2025Data Structures › Trees & Binary Search TreesVerified
GATE CSE 2025 PYQ: Which of the following statement(s) is/are TRUE for any binary search tree (BST) having n n n distinct…
- AThe maximum length of a path from the root node to any other node is .Correct answer
- BAn inorder traversal will always produce a sorted sequence of elements.Correct answer
- CFinding an element takes time in the worst case.
- DEvery BST is also a Min-Heap.
Answer
(A, B) The maximum length of a path from the root node to any other node is ( n − 1 ) (n-1) ( n − 1 ) .; An inorder traversal will always produce a sorted sequence of elements.
Approach
Evaluate each statement against the fundamental properties of a general (not necessarily balanced) BST with n distinct keys. Key facts: a BST can degenerate into a chain of height n−1; inorder traversal of a BST yields sorted order; worst-case search is O(n); and the min-heap property (parent ≤ children) is incompatible with the BST ordering.
Only statements A and B follow from properties that hold for every BST. C assumes balance (not guaranteed), and D confuses the heap ordering with the BST ordering.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.