双亲表示法:
typedef int ElemType;
#define MAX_TREE_SIZE 100
typedef struct {
ElemType data;
int parent;
}PTNode;
typedef struct {
PTNode nodes[MAX_TREE_SIZE];
int n;
}PTree;
孩子兄弟表示法:
typedef int ElemType;
typedef struct CSNode {
ElemType data;
struct CSNode *firstchild, *nextsibling;
}CSNode, *CSTree;