GATE 2025 CS (CS1) – Question 26
Which of the following statement(s) is/are TRUE for any binary search tree (BST) having $n$ distinct integers?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (B) An inorder traversal will always produce a sorted sequence of elements.
Explanation
Inorder traversal of a BST is always sorted. The maximum path length equals n-1 only for a skewed tree, and a skewed BST makes search O(n). A BST need not satisfy the heap property.