previous | start | next

Preorder and Postorder Traversals

Preorder

Preorder just visits the root first:

Postorder

Postorder just visits the root last:

(Draw some examples)

If the preorder listing is given, can you determine the original tree?

Example

Preorder: 40 50 80 60 90

Draw the tree?



previous | start | next