What is the Height of the given K-ary tree?

Category: QuestionsWhat is the Height of the given K-ary tree?
Editor">Editor Staff asked 4 weeks ago

What is the Height of the given K-ary tree?
 
(a) 0
 
(b) 1
 
(c) 2
 
(d) 3
 
This key question is from K-ary tree in portion Trees of Data Structures & Algorithms I
 
I got this question during an online exam.

1 Answers
Editor">Editor Staff answered 4 weeks ago

Correct answer is (c) 2
 
Easy 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 K-ary tree is 2.