

InterviewSolution
Saved Bookmarks
1. |
Answer the following questions from the diagram of a Binary Tree given below:(i) Write the inorder traversal of the above tree structure.(ii) State the height of the tree, if the root is at level 0 (zero).(iii) List the leaf nodes of the tree. |
Answer» (i) Inorder Traversal = E A B = G E C A B D = G E C H A B D F (ii) Height of Tree = 4 (iii) Leaf nodes of the tree are those nodes that do not have any child. Therefore, leaf nodes are H and F. |
|