#include<stdio.h>
#include<malloc.h>
typedef struct node
{
int date;
node *lchild;
node *rchild;
node *next;
}node,*tree;
int count(node *root)
{
if(!root){return 0;}
else if(!root->lchild&&!root->rchild){return 1;}
else {return(count(root->lchild)+count(root->rchild)+1);}
}
void insert(node *root,node *s)
{
node *p;
p=root;
while(p->next&&p->next->date<=s->date)
{
p=p->next;
}
s->next=p->next;
p->next=s;
}
void creatlink(tree *root)//二级指针
{
int n,count=0;
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余3页未读,立即下载