Suppose the numbers 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?
View worked solution
Answer: C
A fundamental property of any Binary Search Tree (BST) is that its in-order traversal always yields the keys in sorted ascending order.
The set of numbers inserted into the BST is:
Sorting these distinct numbers in ascending order gives:
Therefore, without needing to construct the tree, we can directly determine that the in-order traversal sequence is:
0 1 2 3 4 5 6 7 8 9
This matches Option C.
Free practice · Your answers on this page are not saved.
