front->next;Р }Р }Р else{Р p=rear->next;Р if(p->data < k->data)//将key结点后继比key小的插到key前面Р {Р rear->next=rear->next->next; //断开结点Р p->next=front->next; //插入结点Р front->next=p;Р front=front->next;Р p=rear->next; //*p指回key的后继结点Р }Р else{Р p=p->next; //移动指针Р rear=rear->next;Р }Р }Р?}Р?return head; //返回头指针Р}Р开始РLNode *k,*p,*front,*rear,*L;РDataType key;Рfront=head; p=head->next;Рprintf("请输入key:");Рscanf("%d",&key);РL=Locate(head,key);Рk=L;Рrear=k;Рp!=headРfront->next!=kРp->data> k->dataРfront->next=front->next->next;Рp->next=rear->next;Рrear->next=p;Рrear=rear->next;Рp=front->next;Р?p=p->next;Рfront=front->next;Рp=rear->next;Рp->data< k->dataРrear->next=rear->next->next;Рp->next=front->next;Рfront->next=p;Рfront=front->next;Рp=rear->next;Рp=p->next;Рrear=rear->next;Рreturn head;Р结束РYРNРYРNРNРYРNРY