I want to create an n-ary tree composed in this way:
Each node has a key, name, type (File/Folder) and URL:
struct node {
int key;
char[10] name;
char[100] url;
char type;
} node;
Every node can have a different number of child nodes.
I already read about a solution that uses linked lists: N-ary trees in C
But it doesn't say anything about algorithms for adding or accessing nodes.
How can I store my data in a tree like this?
How can I add nodes to the linked list?
How can I access the data once the tree is built?
Aucun commentaire:
Enregistrer un commentaire