Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
460 views
in Computer by (67.8k points)
closed by

The pre-order transversal of a binary search tree is given by 12, 8, 6, 2, 7, 9, 10, 16, 15, 19, 17, 20. Then the post-order traversal of this tree is: 

(A) 2,6,7,8,9,10,12,15,16,17,19,20 

(B) 2,7,6,10,9,8,15,17,20,19,16,12 

(C) 7,2,6,8,9,10,20,17,19,15,16,12 

(D) 7,6,2,10,9,8,15,16,17,20,19,12

1 Answer

+1 vote
by (68.9k points)
selected by
 
Best answer

(B) 2,7,6,10,9,8,15,17,20,19,16,12 

Given: Preorder ! 12, 8, 6, 2, 7, 9, 10, 16, 15, 19, 17, 20 

In order! 2, 6, 7, 8, 9, 10, 12, 15, 16, 17, 19, 20 

Note: BST In order will give ascending order 

Corresponding BST is

∴ Post order is 2, 7, 6, 10, 9, 8, 15, 17, 20, 19, 16, 12

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

...