摘要:
#归并排序 #include<iostream> using namespace std; const int N = 100010; int q[N]; int tmp[N]; void merge_sort(int q[],int l, int r) { if(l >= r) return ; 阅读全文
摘要:
#快速排序 1.确定分界点 2.调整区间 3.递归处理左右两段 难点在如何调整区间,使用左右两个指针,当位置不对时互换两个指针的位置。 记住边界条件,j和j+1 #include <iostream> using namespace std; const int N = 100010; int q[ 阅读全文