摘要:
单链表 // head存储链表头,e[]存储节点的值,ne[]存储节点的next指针,idx表示当前用到了哪个节点 int head, e[N], ne[N], idx; // 初始化 void init() { head = -1; idx = 0; } // 在链表头插入一个数a void in 阅读全文
摘要:
快速排序 while写法 #include <iostream> using namespace std; const int N = 1e5 + 10; int n; int q[N]; void quick_sort(int q[], int l, int r) { if(l >= r) ret 阅读全文