Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

ISRO | ISRO CS 2017 | Question 51

  • Last Updated : 15 Mar, 2018

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
(A) 9, 8, 6, 4, 2, 3, 0, 1, 5, 7
(B) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
(C) 0, 2, 4, 3, 1, 6, 5, 9, 8, 7
(D) 9, 8, 7, 6, 5, 4, 3, 2, 1, 0


Answer: (D)

Explanation: Inorder traversal of a binary search tree always produces the keys in increasing order. In this question Reverse ordering of natural numbers are used i.e. 9 is assumed to be the smallest and 0 to be the largest. So the sequence in increasing order will be 9, 8, 7, 6, 5, 4, 3, 2, 1, 0.
So, option (D) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!