3,318 views

Which of the following sequences denotes the post order traversal sequence of the below tree?

1. $f\; e\; g\; c\; d\; b\; a$
2. $g\; c\; b\; d\; a\; f\; e$
3. $g\; c\; d\; b\; f\; e\; a$
4. $f\; e\; d\; g\; c\; b \;a$

C) g c d b f e a

Correct Option: C

Left $\to$ Right $\to$ Root.

Ref: https://gateoverflow.in/2718/gate1996_1-14

Tree Traversals

Pre Order  : Visit,Left,Right

In Order : Left Visit Right

Post Order : Left, Right, Visit
gcdbfea option c is right
Post order: Left → Right → Root.

Root is at last. (here a) So option B eliminated.

g is leftmost node so it should be traversed first. So B and D eliminated.

So C is correct.
by