# Understanding an "Inorder Traversal"

• 02-25-2010
Understanding an "Inorder Traversal"
I'm a little confused on what an "Inorder Traversal" is. All the sites I go to say:

1. Traverse the left subtree; and then
2. visit the root; and then
3. traverse the right subtree.

Looking at this tree: http://www.math.bas.bg/~nkirov/2010/.../ch06/pic3.jpg

Would an "Inorder Traversal" go:

A -> B -> D -> B -> E -> H -> E -> I -> E -> B -> A -> C -> F -> C -> G -> C -> A

?

Only printing each "node" when it visits it the last time?
• 02-25-2010
itCbitC
Bingo! inorder tree traversal happens recursively at each node.
• 02-25-2010
karthigayan
In inorder traversal If that node is the parent of some other node(s) then traverse to the left child . If there is a sub tree traverse recursively till the left node's availability.Then process with that left child.Then process with the current parent .Then goto the right child of the parent and process it.

Left child->Parent -> Right
• 02-25-2010
Alexander jack