1.

Which nodes are the siblings of Node B of given ternary tree?(a) E(b) C(c) F(d) Both E and FMy enquiry is from Ternary tree topic in section Trees of Data Structures & Algorithms IThis question was addressed to me in an online interview.

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.



Discussion

No Comment Found

Related InterviewSolutions