voiddeleteList(structnode* pl, min, max){structnode* p = pl->next;
strcut node* i =NULL;structnode* j =NULL;while(p!=NULL){//遍历单链表Lstructnode* temp;if(p->data <min){//找到小于min的最大值
i = p;}if(p->data >max){//找到大于max的最小值
j = p;break;}if(p->data >min && p->data<max){//删除符合条件的结点
temp = p;
p = p->next;free(temp);}}if(i!=NULL){//若表中有被删除的结点,则重新连接链表
i->next = j;}}//单链表长度为N,则时间复杂度为O(N)
voiddeleteCircle(structnode* s){structnode* p = s;
strcut node* q;while(p->next != s){
q = p;
p = p->next;}
q->next = s;free(p);
p =NULL;}
voidaddNode(structnode* pl,structnode X){structnode* p = pl->next;structnode* i = pl;structnode* j =NULL;while(p!=NULL){if(p->data > X->data){//找到比X大的最小值
i = p;}if(p->data < X->data){//找到比X小的最大值
j = p;break;}}
i->next = X;
X->next = j;}
voidreverse(structnode* pl){structnode* p = pl->next;
Stack S =initStack();while(p!=NULL){//将链表节点逐个压栈push(S,p);
p = p->next;}
p = pl;while(!Stackempty()){//将链表节点逐个出栈,并重新连接structnode* temp =pop(S);
p->next = temp;
p = p->next;}
p->next =NULL;}
//队满:quelen = mvoidenterQueue(Queue *q,int v){if(quelen!=m){
q.rear =(q.rear+1)% m;
q.cycQue[q.rear]= v;}}intOutQueue(Queue *q){if(!queueEmpty()){int pos =(q.rear-q.quelen +1+ m)% m;
quelen --;return q.cycque[pos];}}