2015年10月5日
摘要: #includeusing namespace std;void Shellsort(int *a,int len){ int gap; for(gap=3;gap>0;gap--) { for(int i=0;i=0&&a[k]>temp) ... 阅读全文
posted @ 2015-10-05 17:30 Oneface 阅读(159) 评论(0) 推荐(1) 编辑
摘要: #include using namespace std;void Quicksort(int *a,int low,int high){ if(low>high) { return; } int i=low; int j=high; int key... 阅读全文
posted @ 2015-10-05 15:57 Oneface 阅读(252) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;void Insertsort(int *a,int len){ for(int j=1;j0&&a[i]>key) { a[i+1]=a[i]; i--; } ... 阅读全文
posted @ 2015-10-05 12:49 Oneface 阅读(184) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;void Selection(int *a,int len){ for(int i=0;i>a[i]; } Selection(a,n); for(int j=0;j<n;j++) { cout<<... 阅读全文
posted @ 2015-10-05 10:51 Oneface 阅读(233) 评论(0) 推荐(0) 编辑