Post-order traversal
Appearance
In Computer science, Post-order traversal is used in Data structures, and specifically, Trees and Binary Trees.
Steps to Post-order Traversal
Given a non-empty tree,
- Process the nodes in the left subtree with a recursive call
- Process the nodes in the right subtree with a recursive call
- Process the root
Given a binary tree PY:
The order would go D,G,E,B,C,F,A
Compare: Pre-order traversal, Inorder traversal