What is the depth of the root node of the ternary tree?

Category: QuestionsWhat is the depth of the root node of the ternary tree?
Editor">Editor Staff asked 4 weeks ago

What is the depth of the root node of the ternary tree?
 
(a) 2
 
(b) 1
 
(c) 0
 
(d) 3
 
I’m obligated to ask this question of 1 topic in section Trees of Data Structures & Algorithms I
 
The question was asked in unit test.

1 Answers
Editor">Editor Staff answered 4 weeks ago

The correct answer is (c) 0
 
Easiest explanation – Depth is defined as the length of the path from root to the node. So the depth of root node in ternary tree is 0.