Hide Index
Binary Tree
0% completed
Introduction to binary trees
Array implementation of binary trees
Linked list implementation of binary trees
Recursive traversals in binary trees
Iterative traversals in binary trees
Constructing a binary tree
Insertion in binary trees
Pattern: Preorder traversal (Stateless)
Pattern: Preorder traversal (Stateful)
Pattern: Postorder traversal (Stateless)
Pattern: Postorder traversal (Stateful)
Pattern: Root to leaf path (Stateless)
Pattern: Root to leaf path (Stateful)
Pattern: Level order traversal
Pattern: Lowest common anscestor
Pattern: Simultaneous traversal
Practice: Mix traversals
Certificate
Understanding iterative postorder traversal
Just like preorder and inorder traversal, to understand the iterative implementation of postorder traversal, we need to split the whole process into small steps and understand how each step functions. Let us start by looking at how postorder traversal is done.
Algorithm
- Step 1: Recursively traverse the node's `left` subtree.
- Step 2: Recursively traverse the node's `right` subtree.
- Step 3: Visit the node.
Iterative Steps
Liking the course? Check our discounted plans to continue learning.