int partition(int* a,int l,int r) void qsort(int* a,int l,int r) |
void insertsort(int* a,int n) { int key; for(int j=1;j { key = a[j]; for(int i=j-1;i>=0&&a[i]>key;i--) { a[i+1] = a[i]; } a[i+1] = key; } } |
void buble(int *a,int n) { for(int i=0;i { for(int j=1;j { if(a[j] { int temp=a[j]; a[j] = a[j-1]; a[j-1] = temp; } } } } |