diff --git a/Quick Sort/QuickSort.c b/Quick Sort/QuickSort.c new file mode 100644 index 0000000..66170eb --- /dev/null +++ b/Quick Sort/QuickSort.c @@ -0,0 +1,85 @@ +#include +#include +int count; +void quicksort(int[], int, int); +int partition(int[], int, int); +int main() +{ + int a[1200],b[1200],c[1200],c1,c2,c3,i,j,n; + printf("Enter the number of elements: "); + scanf("%d",&n); + printf("Enter the elements: "); + for(i = 0; i < n; i++) + scanf("%d",&a[i]); + quicksort(a,0,n-1); + printf("Sorted Array:"); + for(i=0;i=p && j>low) + { + j--; + count++; + } + count++; + if(i