Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Algorithm

Post-order traversal

Graph Algorithm

Post-order traversal, also known as postfix traversal, is a way of visiting every node of a tree by recursively processing all of the subtrees first and then finally processing the root. It is a kind of tree traversal and a form of depth-first search. If the processing step is simply printing, a tree is printed as the first subtree, then the second subtree and so on up to the last subtree, followed by the root. For a binary tree the procedure is short: if the tree is null it returns, otherwise it processes the left subtree, then the right subtree, and finally prints the root. The Dictionary of Algorithms and Data Structures lists in-order traversal, pre-order traversal, level-order traversal and the Cupif-Giannini tree traversal as related entries, so post-order traversal is best understood as one of several standard orders for walking a tree.

Connections

In Field

Source postorder traversal (NIST Dictionary of Algorithms and Data Structures)
Sources
postorder traversal (NIST Dictionary of Algorithms and Data Structures)
  • In Group: Graph Traversal and Connectivity Algorithms, Definition and Generalization
    tree traversal, depth-first search.
  • In Field: Algorithms and Complexity Theory, Definition
    Process all nodes of a tree by recursively processing all subtrees, then finally processing the root.
View the Source
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.