Data Structure (2130702)

BE | Semester-3   Summer-2017 | 05/31/2017

Q1) (10)

What is common in inorder, preorder and postorder traversal?

Left subtree is always visited before right subtree


Explanations:

The order of inorder traversal is
LEFT ROOT RIGHT
The order of preorder traversal is
ROOT LEFT RIGHT
The order of postorder traversal is
LEFT RIGHT ROOT
In all three traversals, LEFT is traversed before RIGHT