 |
From the post-order traversal, we know that the last element, X, is the
root of the tree.
The first item to be printed out goes on the far left edge of the tree,
since the post-order first tries to go to that node first. The next item
printed is H. Comming up one more level, and we try the right
subtree. Again, for the right subtree, we first travel to the left as far
as possible. After recursing back up from the left, we go to the
right. Following a return from right recursion, we print the values at
their respective nodes.
|