1.

What is the Height of the given ternary tree?(a) 0(b) 1(c) 2(d) 3The query is from Ternary tree in division Trees of Data Structures & Algorithms II have been asked this question during an online interview.

Answer»

The correct OPTION is (c) 2

Best explanation: HEIGHT of the tree is defined as the length of the PATH from root node to the DEEPEST node of the tree. Here deepest nodes are 5,6,7 which are at length 2. So the height of the ternary tree is 2.



Discussion

No Comment Found

Related InterviewSolutions