Postordre
Postordre is the French term for postorder traversal, a depth-first approach used to visit nodes in a tree. In this traversal, each node is processed after all of its descendants. In a binary tree, the common order is left subtree, right subtree, then the node itself. For general trees, the procedure visits each child subtree before the node.
Implementation can be done recursively or iteratively. A recursive version calls postorder on the left child,
The time complexity of postorder traversal is O(n), where n is the number of nodes. The space
Postorder traversal has several practical uses. It is natural for bottom-up processing tasks, such as deleting