+1 vote
in Data Structures & Algorithms I by (110k points)
What is the depth of Node G in the given ternary tree?

(a) 0

(b) 1

(c) 2

(d) 3

The origin of the question is Ternary tree topic in chapter Trees of Data Structures & Algorithms I

I got this question in quiz.

1 Answer

+1 vote
by (672k points)
selected by
Best answer
Correct option is (c) 2

Best explanation: Depth of the node is the length of the path from root to the node. Here, length of path from root to Node G is 2. So depth of Node G is 2.

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.