随笔分类 - 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; }
阅读全文
摘要:#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
阅读全文
摘要: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 &&
阅读全文

浙公网安备 33010602011771号