Tree traversals

Three depth-first search methods

  1. Pre-order: root, left, right

    Pre-order: F, B, A, D, C, E, G, I, H

  2. In-order: left, root, right

    In-order: A, B, C, D, E, F, G, H, I

  3. Post-order: left, right, root

    Post-order: A, C, E, D, B, H, I, G, F