链表排序
void sort(NODE *head){ NODE *p=NULL; while(p!=head){ NODE *tmp=head; for(tmp=head;tmp->next!=p;tmp=tmp->next){ if(tmp->score>tmp->next->score){ int t=tmp->score; tmp->score=tmp->next->score; tmp->next->score=t; } } p=tmp; } }
参考:
https://blog.csdn.net/yizhangbiao/article/details/51018434
https://blog.csdn.net/bitboss/article/details/51602826