- #1
barbara
- 10
- 0
The following algorithm describes a postorder tree traversal
Postorder(tree)
If left subtree exists then Postorder(left subtree)
If right subtree exists then Postorder(right subtree)
Print root
end
How can I apply that to the following tree
+
/ \
/ \
* -
/ \ / \
2 3 * +
/ \ / \
4 2 1 5
What is the result of the computation? What kind of algorithm is being used here?
Postorder(tree)
If left subtree exists then Postorder(left subtree)
If right subtree exists then Postorder(right subtree)
Print root
end
How can I apply that to the following tree
+
/ \
/ \
* -
/ \ / \
2 3 * +
/ \ / \
4 2 1 5
What is the result of the computation? What kind of algorithm is being used here?