Suppose the numbers 7, 5, 1, 8, 3, 6, 0, 9, 4, 2 are inserted in that order into an initially empty binary search tree. The binary search tree uses the usual ordering on natural numbers. What is the in-order traversal sequence of the resultant tree?
(A) 7 5 1 0 3 2 4 6 8 9
(B) 0 2 4 3 1 6 5 9 8 7
(C) 0 1 2 3 4 5 6 7 8 9
(D) 9 8 6 4 2 3 0 1 5 7
Answer: (C)
Explanation: In-order traversal of a BST gives elements in increasing order. So answer c is correct without any doubt.
Quiz of this Question
Recommended Posts:
- Data Structures | Binary Search Trees | Question 12
- Data Structures | Binary Search Trees | Question 10
- Data Structures | Binary Search Trees | Question 8
- Data Structures | Binary Search Trees | Question 12
- Data Structures | Binary Search Trees | Question 5
- Data Structures | Binary Search Trees | Question 3
- Data Structures | Binary Search Trees | Question 2
- Data Structures | Binary Search Trees | Question 1
- Data Structures | Binary Search Trees | Question 4
- Data Structures | Binary Search Trees | Question 7
- Data Structures | Binary Search Trees | Question 12
- Data Structures | Balanced Binary Search Trees | Question 4
- Data Structures | Balanced Binary Search Trees | Question 5
- Data Structures | Balanced Binary Search Trees | Question 10
- Data Structures | Balanced Binary Search Trees | Question 13
- Data Structures | Balanced Binary Search Trees | Question 13
- Data Structures | Balanced Binary Search Trees | Question 2
- Data Structures | Balanced Binary Search Trees | Question 12
- Data Structures | Balanced Binary Search Trees | Question 9
- Data Structures | Balanced Binary Search Trees | Question 2

