What is the height of a K-ary tree having only root node?

Category: QuestionsWhat is the height of a K-ary tree having only root node?
Editor">Editor Staff asked 1 month ago

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 Answers
Editor">Editor Staff answered 1 month ago

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.