1.

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

Answer»

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.



Discussion

No Comment Found

Related InterviewSolutions