Question
Which of the following statement(s) is/are TRUE for any binary search tree (BST) having distinct integers?
Official answer and solution
- Official answer
- A and B
- From
- Official GATE 2025 answer key
Solution
Check each property for an arbitrary (possibly unbalanced/skewed) BST with distinct keys.
- (A) True: In the worst case (a degenerate/skewed BST where every node has at most one child), the path from the root to the deepest leaf has edges.
- (B) True: By the BST ordering property (left subtree right subtree), an inorder traversal always visits keys in strictly increasing (sorted) order.
- (C) False: In a skewed BST, finding an element takes time in the worst case, not .
- (D) False: A BST with a non-empty left child has a left child smaller than its parent, violating the Min-Heap property.
Final answer
Options (A), (B)
Common trap
Assuming a BST is balanced in the worst case and selecting (C).
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2025 Computer Science and Information Technology - Session 1 (CS1)
- Question
- 26 of 65
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.