+1 vote
in Data Structures & Algorithms I by (110k points)
Which nodes are the siblings of Node B of given ternary tree?

(a) E

(b) C

(c) F

(d) Both E and F

My enquiry is from Ternary tree topic in section Trees of Data Structures & Algorithms I

This question was addressed to me in an online interview.

1 Answer

+1 vote
by (672k points)
selected by
Best answer
The correct answer is (d) Both E and F

Easiest explanation - Siblings are the nodes that share same parent. Since both the Node E and Node F have same parent Node B, So the sibling of Node B is Node E and Node F.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.