# Which of the following properties are obeyed by all three tree – traversals?

+1 vote
Which of the following properties are obeyed by all three tree – traversals?

(a) Left subtrees are visited before right subtrees

(b) Right subtrees are visited before left subtrees

(c) Root node is visited before left subtree

(d) Root node is visited before right subtree

My question is from Binary Trees topic in chapter Binary Trees of Data Structures & Algorithms I

This question was addressed to me during an online exam.

+1 vote
by (789k points)
selected by

Right answer is (a) Left subtrees are visited before right subtrees

Best explanation: In preorder, inorder and postorder traversal the left subtrees are visited before the right subtrees. In Inorder traversal, the Left subtree is visited first then the Root node then the Right subtree. In postorder traversal, the Left subtree is visited first, then Right subtree and then the Root node is visited.

+1 vote
+1 vote
+1 vote
+1 vote
+1 vote
+1 vote
+1 vote
+1 vote
+1 vote
+1 vote
+1 vote
+1 vote
+1 vote
+1 vote
+1 vote
+1 vote
+1 vote