Professional Documents
Culture Documents
Traversal Algorithms
• preorder
• inorder
• postorder
PreOrder Traversal
Inorder Traversal
Postorder Traversal
In which order does a inorder traversal visit
the vertices in this ordered rooted tree?
output: j e n k o p b f a c l g m d h i
In which order does a postorder traversal visit
the vertices in this ordered rooted tree?
Infix, Prefix, and Postfix Notation
Algebraic expressions
•preorder – Polish notation
•inorder – infix notation
•postorder – reverse Polish notation