//树的存储表示
//1.双亲数组存储表示
#define n0 30
#define datatype char
struct element
{
datatype data;
int parent;
}
struct tree
{
struct element t[n0+1];
int root;
}
//2.孩子链表存储表示
#define n0 30
#define datatype char
struct node
{
int j;
struct node* next;
}
struct element
{
datatype data;
struct node *children;
}
struct tree
{
struct element t[n0+1];
int root;
}
//3.孩子--兄弟链
版权声明:本文为Yeaii_yyii原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。