1.

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 TMy question comes from Binary Trees in chapter Binary Trees of Data Structures & Algorithms IThe question was asked during an internship interview.

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.



Discussion

No Comment Found

Related InterviewSolutions