+1 vote
in Data Structures & Algorithms I by (110k points)
What is the Height of the given ternary tree?

(a) 0

(b) 1

(c) 2

(d) 3

The query is from Ternary tree in division Trees of Data Structures & Algorithms I

I have been asked this question during an online interview.

1 Answer

+1 vote
by (672k points)
selected by
 
Best 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.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...