摘要: 快速排序(算法导论版) include using namespace std; void swap(int &a,int &b){ int temp = a; a = b; b = temp; } int parttion(int a[],int l,int r){ int x = a[r]; / 阅读全文
posted @ 2018-12-25 16:11 Western_Trail 阅读(344) 评论(0) 推荐(0) 编辑
摘要: ``` include using namespace std; int a[11] = {10,9,8,6,3,7,2,1,1,4,5}; void selectSort(int a[],int n){ //选择排序 int min,index; for(int i = 0;i a[j]) { m 阅读全文
posted @ 2018-12-25 16:09 Western_Trail 阅读(230) 评论(0) 推荐(0) 编辑