+1 vote
in Data Structures & Algorithms I by (110k points)
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 Answer

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

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.