it's graph??

Dark Mode

3 votes

with binary tree is not possible . cause we cannot represent one hving more than two children.

with n tree not possible . we can not represent sibiling or other kind of relationship that creates cycle.

yes, with graph , it is possible. and it is aprropriate.

with cyclic doubly linked list , it is possible to implement but it takes lot of space for double pointers . it is not appropriate than graph .

so i will go with option c

with n tree not possible . we can not represent sibiling or other kind of relationship that creates cycle.

yes, with graph , it is possible. and it is aprropriate.

with cyclic doubly linked list , it is possible to implement but it takes lot of space for double pointers . it is not appropriate than graph .

so i will go with option c

3

Sir still can’t understand how n-ary tree will be enough to show both siblings and parents relation simultaneously.

In the figures on Pinterest, either it is depicted as single child with all their parents (& no siblings are present), or both mother & father aren’t depicted as a node in tree can have only 1 parent

In the figures on Pinterest, either it is depicted as single child with all their parents (& no siblings are present), or both mother & father aren’t depicted as a node in tree can have only 1 parent

0

0 votes

It is definitely n-ary tree.

Linked List can't represent someone having two children.

Binary tree can't represent someone having three children.

A graph can represent A's child to be the father of B if A and B are siblings. (Visualize it)

An n-ary tree would represent someone having *n * number of children, without disrupting the hierarchy.

**Option B**