- 博客(9)
- 收藏
- 关注
原创 完全二叉树判定
int isfull(BiTree *t){ BiTree *p=T; InitQueue(Q); EnQueue(Q,T); while(!IsEmpty(Q)){ DeQueue(Q,p); if(p){ EnQueue(Q,p->rchild); EnQueue(Q,p->lchild); } else while(!IsEmpty(Q)){ DeQueue(Q,p); if(p){ return 0; } .
2021-03-22 09:20:33
236
原创 删除带头结点单链表大于x小于y的元素并释放其空间
void delete(LinkList *L,int x,int y){ LinkList *p,*pre,*q; if(x>y) return 0; p=L; pre=p; p=p->next; while(p&&p->data<y){ if(p->data>=x){ pre=p; p=p->next; } else{.
2021-03-22 08:41:10
3027
4
原创 带头结点单链表插入排序
void sort(LinkList *L){ LinkList *p,*pre,*q; p=L->next-next; L->next=null; while(p){ pre=L; q=p->next; while(pre->next&&p->data>pre->next->data) pre=pre-next; p-&g.
2021-03-20 19:20:27
411
原创 带头结点单链表逆置
void invert(LinkList *head){ LinkList *p,*q; p=head-next; q=p-next; head->next=null; while(q){ p=q; q=q->next; p->next=head->next; head->next=p; }
2021-03-20 19:07:31
974
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人