Treesintro
Post-order Traversal
Visits both subtrees before the node itself. Post-order is how you safely free or evaluate a tree bottom-up — every child is processed before its parent.
- Best
- O(n)
- Average
- O(n)
- Worst
- O(n)
- Space
- O(h)
Visits both subtrees before the node itself. Post-order is how you safely free or evaluate a tree bottom-up — every child is processed before its parent.