+1 vote
in Data Structures & Algorithms I by (110k points)
The pre-order and in-order are traversals of a binary tree are T M L N P O Q and L M N T O P Q. Which of following is post-order traversal of the tree?

(a) L N M O Q P T

(b) N M O P O L T

(c) L M N O P Q T

(d) O P L M N Q T

My question comes from Binary Trees in chapter Binary Trees of Data Structures & Algorithms I

The question was asked during an internship interview.

1 Answer

+1 vote
by (672k points)
selected by
 
Best answer
The correct answer is (a) L N M O Q P T

The explanation is: The tree generated by using given pre-order and in-order traversal is

Thus, L N M O Q P T will be the post-order traversal.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...