//树的存储表示
//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.孩子--兄弟链
树的存储表示
最新推荐文章于 2024-06-26 23:14:31 发布