1.

What is the depth of Node G in the given ternary tree?(a) 0(b) 1(c) 2(d) 3The origin of the question is Ternary tree topic in chapter Trees of Data Structures & Algorithms II got this question in quiz.

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.



Discussion

No Comment Found

Related InterviewSolutions