插
new->next=next;
next->prev=new;
prev->next=new;
new->prev=prev;
删
strcut lis-head *p=prev->next;
prev->next=p->next;
next->prev=p->prev;
free(p);
p=NULL;
尾插
struct list-head *p=head
while(p->next!=NULL)
{
p=p->next;
}
new->next=p->next;
p->next=new;
new->pre=p;
判断为空
if(prev->NEXT==NULL)
{
return -1;
}
队列
1)seqn[tail]=data;tail++;
2)data=aeqn[head+1];
3)if(head==tail);
4)if((tail+1)%N==head);
5)head=tail;
6)(tail-head+N)%N;
7)N-1
2y25周末
最新推荐文章于 2024-07-20 14:49:29 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)