单链表排序

前言: 最近总结了一下针对只有头结点的单链表进行排序的几个简单的方法。html 交换节点:插入排序,冒泡排序,简单选择排序 交换数据:快速排序node 初始化: #include <stdio.h> #include <stdlib.h> #include <stdbool.h> //节点结构 struct node { int val; struct node * next;
相关文章
相关标签/搜索