Data Structures | Binary Search Trees | Question 10
Which of the following traversals is sufficient to construct BST from given traversals
1) Inorder
2) Preorder
3) Postorder
(A) Any one of the given three traversals is sufficient
(B) Either 2 or 3 is sufficient
(C) 2 and 3
(D) 1 and 3
Answer: (B)
Explanation: When we know either preorder or postorder traversal, we can construct the BST. Note that we can always sort the given traversal and get the inorder traversal. Inorder traversal of BST is always sorted.
Quiz of this Question
Recommended Posts:
- Data Structures | Binary Search Trees | Question 3
- Data Structures | Binary Search Trees | Question 8
- Data Structures | Binary Search Trees | Question 12
- Data Structures | Binary Search Trees | Question 7
- Data Structures | Binary Search Trees | Question 5
- Data Structures | Binary Search Trees | Question 4
- Data Structures | Binary Search Trees | Question 12
- Data Structures | Binary Search Trees | Question 2
- Data Structures | Binary Search Trees | Question 1
- Data Structures | Binary Search Trees | Question 12
- Data Structures | Binary Search Trees | Question 6
- Data Structures | Balanced Binary Search Trees | Question 12
- Data Structures | Balanced Binary Search Trees | Question 10
- Data Structures | Balanced Binary Search Trees | Question 13
- Data Structures | Balanced Binary Search Trees | Question 13



