GATE 2025 set1 · CS · MSQ · 1 mark · Programming and Data Structures › Binary Search Trees
GATE 2025 set1 Computer Science and Information Technology question: Which of the following statement(s) is/are TRUE for any binary search tree (BST) having…
Which of the following statement(s) is/are TRUE for any binary search tree (BST) having n distinct integers?
- (A)
The maximum length of a path from the root node to any other node is (n−1).
- (B)
An inorder traversal will always produce a sorted sequence of elements.
- (C)
Finding an element takes O(log2n) time in the worst case.
- (D)
Every BST is also a Min-Heap.
Show answer
Official answer: A,B
Practise this question with exam-style marking