Traversal Algorithms

Iterative Traversals

Stack-based Iterative Traversal Algorithms

Non-Stack-based Iterators and Iterative Algorithms

If the node class has a parent pointer, tree traversal can be done iteratively without recourse to a stack. Such iterators classes for in-order, pre-order and post-order recursion algorithms are discussed below.