Is parent node of Node 4 and root node of the given K-ary tree same?

Category: QuestionsIs parent node of Node 4 and root node of the given K-ary tree same?
Editor">Editor Staff asked 4 weeks ago

Is parent node of Node 4 and root node of the given K-ary tree same?
 
(a) True
 
(b) False
 
This is a very interesting question from K-ary tree topic in chapter Trees of Data Structures & Algorithms I
 
I got this question in an online interview.

1 Answers
Editor">Editor Staff answered 4 weeks ago

The correct answer is (a) True
 
Easy explanation – Since Root node of the ternary tree is Node 1 and also Node 1 has three children that is Node 2, Node 3, Node 4. So parent node of Node 4 and the root node of the ternary tree are same.