Which of the following is/are correct in order traversal sequence(s) of binary search tree(s)?
View worked solution
Answer: A
A fundamental property of a Binary Search Tree (BST) is that its inorder traversal always yields the keys in a strictly increasing (sorted) order.
Let us analyze the given sequences:
- I. : This sequence is sorted in strictly increasing order. Therefore, it is a valid inorder traversal of a BST.
- II. : This sequence is not sorted because . Therefore, it cannot be an inorder traversal of a BST.
- III. : This sequence is not sorted because . Therefore, it cannot be an inorder traversal of a BST.
- IV. : This sequence is sorted in strictly increasing order. Therefore, it is a valid inorder traversal of a BST.
Thus, only sequences I and IV are correct inorder traversal sequences of a BST.
Free practice · Your answers on this page are not saved.
