+1 vote
in Data Structures & Algorithms I by (110k points)
What is the height of a K-ary tree having only root node?

(a) 1

(b) 0

(c) 2

(d) 3

This intriguing question originated from K-ary Tree in portion Trees of Data Structures & Algorithms I

The question was posed to me in a job interview.

1 Answer

+1 vote
by (737k points)
selected by
 
Best answer
Correct choice is (b) 0

The best I can explain: Height of a K-ary tree does not include the root node. So the height of the K-ary tree is without root node is 0.

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

...