mercredi 14 septembre 2016

How to get all child nodes of a specific node in non-binary tree in C++

I'm being stuck because I don't know how to get all child nodes of a specific node in non-binary tree.

For example, the root node is A.

A = {B, C}

B = {D, E, F}

E = {G}

I want to get all child nodes of B = {D, E, F, G}

How can I do? Thank you very much.

Aucun commentaire:

Enregistrer un commentaire