For a binary tree the first node visited in in-order and post-order traversal is same.

Category: QuestionsFor a binary tree the first node visited in in-order and post-order traversal is same.
Editor">Editor Staff asked 4 weeks ago

For a binary tree the first node visited in in-order and post-order traversal is same.
 
(a) True
 
(b) False
 
My question is taken from Binary Trees topic in portion Binary Trees of Data Structures & Algorithms I
 
This question was addressed to me during an internship interview.

1 Answers
Editor">Editor Staff answered 4 weeks ago

The correct option is (b) False
 
The explanation is: Consider a binary tree,
 
Its in-order traversal – 13 14 16 19
 
Its post-order traversal- 14 13 19 16. Here the first node visited is not same.