Tree Traversal

Question 1
Consider the following rooted tree with the vertex la beled P as t he root: The order in which the nodes are visited during an i n-order trave rsal of the tree is  
A
SQPTRWUV
B
SQPTUWRV
C
SQPTWUVR
D
SQPTRUWV
       Algorithms       Tree Traversal       Gate 2014 Set -03
Question 1 Explanation: 
The tree can be redrawn as

Inorder Traversal: Left, Root, Middle, Right.
So, durig inorder traversal whenever we visit the node second time then print it.
So, output will be,
S Q P T R W U V
There is 1 question to complete.
PHP Code Snippets Powered By : XYZScripts.com