What is the depth of the root node of K-ary tree?

Category: QuestionsWhat is the depth of the root node of K-ary tree?
Editor">Editor Staff asked 5 months ago

What is the depth of the root node of K-ary tree?
 
(a) 2
 
(b) 1
 
(c) 0
 
(d) 3
 
My question is taken from K-ary tree in section Trees of Data Structures & Algorithms I
 
The question was asked during an internship interview.

1 Answers
Editor">Editor Staff answered 5 months ago

Right option is (c) 0
 
The best I can explain: Depth is defined as the length of the path from root to the node. So the depth of root node in K-ary tree is 0.


Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17
Articles: 40701