postorder traversal

(idea) by nbaldwin (?) Sun Nov 14 1999 at 9:06:39
A way of traversing a tree that processes the current node after processing the left and right subtrees. This is a depth-first algorithm, and can be compared to preorder traversal and inorder traversal.
(idea) by ClockworkGrue (1.1 y) Thu Aug 30 2001 at 22:19:16
Preorder Traversal | Postorder Traversal | Inorder Traversal

  1. Traverse the left subtree.
  2. Traverse the right subtree.
  3. Visit the root.
For those of us who are visual learners, the postorder traversal of a binary tree would look like this.

           F     depth = 0
          / \
         B   E   depth = 1
        /   / \
       A   C   D depth = 2
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.