Traversal Algorithms ==================== General References on BST Traversal ----------------------------------- Non Stack-Based BST Iterators Implementation Discussions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * `OLD Dominion Univ: Traversing Trees with Iterator, a C++ STL-compatible iterator for BST. Q&A teaching discussion `_ * `Morris In-Order Traversal: Inorder Tree Traversal without Recursion or Stack `__ Stack-Based Iterators Implementations Discussion ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * `stack-based pre-, in- and post-order traversal algorithms `_ * `Both Iterative and Recursive traversal algortihms `_ * `Overview of statck-based Java iterators for pre-order, in-order and post-order traversal `_ * `Carneige Mellon: Java like pre-order iterator class using a stack `__. Source `here `_. Iterative Traversals -------------------- Stack-based Iterative Traversal Algorithms ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 stk-iter-traversal.rst 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. .. toctree:: :maxdepth: 1 inorder-iter.rst preorder-iter.rst postorder-iter.rst