| | | | | |

Binary Tree Algorithm Atomics: Navigation

  • Analogous to list iterators
  • Use tree structure to navigate
    • n.Initialize(b) sets n at the root of b
    • ++n moves n down to its left child
    • n++ moves n down to its right child
    • --n or n-- moves n up to its parent
  • NOT a tree Iterator!
    • Iteration of tree depends on external considerations
    • Tree structure and iteration order not the same
    • Navigator used to implement tree Iterator types

| | Top of Page | 14. BST Iterators - 3 of 41