void BubleSort(Plinklist *pplist)
{
assert(pplist );
Node *end= NULL ;
Node *begin = *pplist ;
while ((*pplist )->next != end)
{
while (begin->next!=end)
{
if (begin->data < begin->next->data)
{
int tmp = begin->data;
begin->data = begin->next->data;
begin->next->data = tmp;
}
begin = begin->next;
}
end = begin;
【C语言】单链表的排序
最新推荐文章于 2024-07-19 21:10:28 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)