recategorized by
2,750 views
5 votes
5 votes

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 reversal ordering on natural numbers i.e. $9$ is assumed to be smallest and $0$ is assumed to be largest. The $in$-$order$ traversal of the resultant binary search tree is

  1. $9,8,6,4,2,3,0,1,5,7$
  2. $0,1,2,3,4,5,6,7,8,9$
  3. $0,2,4,3,1,6,5,9,8,7$
  4. $9,8,7,6,5,4,3,2,1,0$
recategorized by

1 Answer

8 votes
8 votes
The Inorder traversal of BST is always in ascending order. Here since 9 is smallest and 0 is largest Inorder traversal will be actually in descending order.

Ans- Option D
Answer:

Related questions

40 votes
40 votes
5 answers
1
Kathleen asked Sep 22, 2014
43,559 views
What is the maximum height of any AVL-tree with $7$ nodes? Assume that the height of a tree with a single node is $0$.$2$$3$$4$$5$
3 votes
3 votes
2 answers
2
gatecse asked Dec 17, 2017
1,248 views
The $in$-$order$ and $pre$-$order$ traversal of a binary tree are $\text{d b e a f c g}$ and $\text{a b d e c f g}$ respectively.The $post$-$order$ traversal of a binary ...
3 votes
3 votes
2 answers
3
gatecse asked Dec 17, 2017
3,739 views
Which one of the following property is correct for a red-black tree?Every simple path from anode to a descendant leaf contains the same number of black nodes.If a node is...
2 votes
2 votes
2 answers
4
gatecse asked Dec 17, 2017
1,263 views
A strictly binary tree with $10$ leavescannot have more than $19$ nodeshas exactly $19$ nodeshas exactly $17$ nodeshas exactly $20$ nodes