链表的排序用冒泡排序来做
for ( j=head->next; j; j=j->next ) {
for ( k=j->next; k; k=k->next ) {
if ( j->date > k->date ) {
int t = j->date;
j -> date = k -> date;
k -> date = t;
}
}
}
具体题目参照:https://blog.csdn.net/weixin_43828245/article/details/87553830