in DS edited by
3,318 views
21 votes
21 votes

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$
in DS edited by
3.3k views

2 Comments

0
0
C) g c d b f e a
0
0

3 Answers

22 votes
22 votes
Best answer

Correct Option: C

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

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

edited by

2 Comments

 Tree Traversals 

0
0
Pre Order  : Visit,Left,Right

In Order : Left Visit Right

Post Order : Left, Right, Visit
0
0
2 votes
2 votes
gcdbfea option c is right
0 votes
0 votes
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.
Answer:

Related questions