diff --git a/sorting/qiksort.c b/sorting/qiksort.c deleted file mode 100644 index bdcb1118..00000000 --- a/sorting/qiksort.c +++ /dev/null @@ -1,50 +0,0 @@ -#include -void swap(int *a,int *b) -{ - int t;t=*a;*a=*b;*b=t; -} -void qiksort(int a[],int n,int l,int r) -{int pivot = a[l]; - int p1=l+1,p2=r; - if (r>l) - { - while(p2>=p1) - {if (a[p1]>pivot && a[p2]=pivot) - {p2--;} - - } - } - swap(&a[p2],&a[l]); - - qiksort(a,n,l,p2-1); - qiksort(a,n,p2+1,r); - - } - -} -int main() -{ - int n,*a,i; - scanf("%d",&n); -a = (int*)malloc(n*sizeof(int)); -for (i=0;i