Question 70Asked in DSSSB PGT Computer Science (Technical), 11 Jul 2021

The numbers 70, 50, 10, 80, 30, 60, 100, 90, 40, 20 are inserted in the given order in to a binary search tree. What is the in-order traversal sequence of…

The numbers 70, 50, 10, 80, 30, 60, 100, 90, 40, 20 are inserted in the given order in to a binary search tree. What is the in-order traversal sequence of the resultant binary search tree?
  1. A70, 50, 10, 80, 30, 60, 100, 90, 40, 20
  2. B100, 90, 80, 70, 60, 50, 40, 30, 20, 10
  3. C10, 30, 50, 70, 90, 20, 40, 60, 80, 100
  4. D10, 20, 30, 40, 50, 60, 70, 80, 90, 100
Show answerHide answer

Correct answer: (D) 10, 20, 30, 40, 50, 60, 70, 80, 90, 100

Explanation

In-order traversal of any binary search tree visits the keys in ascending sorted order: 10, 20, ..., 100.

From DSSSB PGT Computer Science PYQ (Technical), 11 Jul 2021

This is question 70 of DSSSB PGT Computer Science PYQ (Technical), 11 Jul 2021. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.