Top
/
Data structures
/
Trees
/
Traversing trees
/
Answer-traverse-2
Answer to Question traverse-2
No. For example, if
T
is
1 / \ / \ 2 5 / \ / \ 3 4 6 7
then printing
T
in preorder yields
1 2 3 4 5 6 7
and printint
T
in postorder yields
3 4 2 6 7 5 1
But if you print
T
in reverse postorder, you get
7 6 5 4 3 2 1