UMBC CMSC 201 & 201H Fall '98 | CSEE | 201 | 201 F'98 | lectures | news | help |
Postorder
In order
All of the traversals are recursive in nature. In the preorder, the value found at the node is printed first, then movement through the tree continues. Here's the function called PreOrder:
In the postorder, movement to the left is done, then movement to the right, and then the value of node is printed. (The value contained in a node will only be printed after all of its children and grandchildren, etc have been printed. Here's the function called PostOrder:
In order, as expected, will print the values contained in all of the nodes of the tree in order. Here's the function called InOrder:
Example traversals will be shown in class