Who is descendant of Node B?

Category: QuestionsWho is descendant of Node B?
Editor">Editor Staff asked 1 month ago

Who is descendant of Node B?
 
(a) A
 
(b) E
 
(c) F
 
(d) Both E and F
 
Origin of the question is Ternary Tree topic in chapter Trees of Data Structures & Algorithms I
 
I have been asked this question during an interview for a job.

1 Answers
Editor">Editor Staff answered 1 month ago

Right option is (d) Both E and F
 
Easiest explanation – Descendant node is a node which has a direct path from ancestor node. Since both E and F are connected to B, so Node E and Node F are the descendants of Node B.