CS计算机代考程序代写 #include

#include
#include

//
// Quick Sort adapted from Wikipedia: http://en.wikipedia.org/wiki/Quicksort
// cmp (a,b) == -1 if ab
//

int partition (void* array[], int left, int right, int pivotIndex, int (*cmp) (void*, void*)) {
void *pivotValue, *t;
int storeIndex;

pivotValue = array [pivotIndex];
array [pivotIndex] = array [right];
array [right] = pivotValue;
storeIndex = left;
for (int i=left; i