Data Structures and Algorithms
with Object-Oriented Design Patterns in C# |
The third depth-first traversal method is inorder traversal . Inorder traversal only makes sense for binary trees. Whereas preorder traversal visits the root first and postorder traversal visits the root last, inorder traversal visits the root in between visiting the left and right subtrees: