孩子兄弟树
- 将图转换为二叉树,找到一个节点,左孩子有兄弟,将其用孩子兄弟法转换为一个二叉树,再按二叉树的方式将其存储
typedef struct node
{
char data;
struct node*child;
struct node*sibling;
}*PNODE,NODE;
typedef struct tree
{
PNODE root;
char ref;
}TREE;
void init(TREE*t);
PNODE create(TREE*t);
int main()
{
TREE tree