随笔分类 -  C语言

摘要:void selectsort(int *a,int len) { int i,j; int temp; for(i=0;i<len-1;i++) { for(j=i+1;j<len;j++) { if(a[i]>a[j]) { temp=a[i]; a[i]=a[j]; a[j]=temp; } 阅读全文
posted @ 2019-03-11 21:33 一人之下冯宝宝 阅读(164) 评论(0) 推荐(0)
摘要:#include <stdio.h> #include <stdlib.h> void output(int *a,int len); void InsertSort(int *array, int len); int main() { int a[6]={1,5,2,9,4,3}; InsertS 阅读全文
posted @ 2019-03-10 22:34 一人之下冯宝宝 阅读(130) 评论(0) 推荐(0)
摘要:void quicksort(int *arry,int low, int high){ int i=low; int j=high; int base=arry[low]; if(low >= high) return; while(low <high) { while(low < high && 阅读全文
posted @ 2019-03-09 23:30 一人之下冯宝宝 阅读(164) 评论(0) 推荐(0)