voie sort(LinkList &L) { LNode *p = L->next; LNode *pre; LNode *r = p ->next; p->next =NULL; p = r; while(p!=NULL){ r = p->next; pre = L; while(pre->next!=NULL&&pre->next->data<p->data) pre = pre->next; p->next = pre->next; pre->next = p; p = r; } }
标签:pre,单链,LNode,递增,NULL,next,while,排序 From: https://www.cnblogs.com/chen10600/p/16735904.html