void fun(linklist *&head){
if(headNULL||head->nextNULL)
return ;
linklist *p=head->next,*pre,*r;
head->next=NULL;
while§{
r=p->next;
pre=head;
if(p->datadata){ //如果小于头结点,则插到前面
p->next=head;
head=p;
}else{
while(pre->next!=NULL&&pre->next->datadata){
p=p->next;
}
p->next=pre->next;
pre->next=p;
p=r;
}
}
}