分治
Reticent_Man
我本微末凡尘,可也心向天空。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
快速排序
#include <iostream> using namespace std; void swap(int &a,int &b) { int tmp=a; a=b; b=tmp; } void QuickSort(int a[],int s,int e) { if(s>=e) return; int k=a[s]; int i=s,j=e; whi...原创 2018-06-21 19:49:27 · 164 阅读 · 0 评论 -
归并排序
#include <iostream> #include <cstring> using namespace std; int a[100],tmp[100]; void Merge(int a[],int s,int m,int e,int tmp[]) { int t=0,p=s; int p1=s,p2=m+1; while(p1<=m&&...原创 2018-06-21 19:50:41 · 183 阅读 · 0 评论
分享