1 private void quickSort(int[] input, int start, int end) { 2 if (start >= end) return; 3 4 int index = partition(input, start, end); 5 6 if (index > start) { 7 quickSort(input, start, index-1); 8
#include <stdio.h> #include <stdlib.h> void swap(int *x,int *y) { int temp; temp = *x; *x = *y; *y = temp; } int choose_pivot(int i,int j ) { return((i+j) /2); } void quicksort(int list[],int m,int n) { int key,i,j,k;