LIVE Course for free

Rated by 1 million+ students
Get app now
0 votes
25 views
in Information Technology by (60.0k points)
closed by
In a binary search tree, which of the following traversals would print the numbers in the ascending order?

(a) Level-order traversal

(b) Pre-order traversal

(c) Post-order traversal

(d) In-order traversal

1 Answer

0 votes
by (91.1k points)
selected by
 
Best answer
Right choice is (d) In-order traversal

The best I can explain: In a binary search tree, a node’s left child is always lesser than the node and right child is greater than the node, hence an in-order traversal would print them in a non decreasing fashion.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...