Which node is the parent node of Node 6?

Category: QuestionsWhich node is the parent node of Node 6?
Editor">Editor Staff asked 4 weeks ago

Which node is the parent node of Node 6?
 
(a) 1
 
(b) 5
 
(c) 2
 
(d) 3
 
My question comes from 1 in section Trees of Data Structures & Algorithms I
 
This question was addressed to me during an interview.

1 Answers
Editor">Editor Staff answered 4 weeks ago

The correct option is (c) 2
 
Easiest explanation – Since Node 2 has two children Node 5 and Node 6, So Node 2 is the parent node of Node 6. While Node 1 is root node and Node 3 and Node 5 are Leaf node.