#include <stdio.h>
int findPivotPos(int array[],int arrStart,int arrEnd){
return arrStart;
}
int partition(int array[],int arrStart,int arrEnd,int pivotPos){
int pivotValue = array[pivotPos];
int array [pivotPos]= array[arrEnd-1];
int ltPivotValueCount=0;
for (int i =arrStart;i<arrEnd-1;++i){
if(array[i]<pivotValue){
int temp =array[arrStart+ltPivotValueCount];
array[arrStart+ltPivotValueCount] =array[i];
array[i]=temp;
++ltPivotValueCount;
}
}
array[arrEnd-1]=array[arrStart+ltPivotValueCount];
array[arrStart+ltPivotValueCount]=pivotValue;
return arrStart+ltPivotValueCount;
}
void quickSort(int array[],int arrStart,int arrEnd){
if( arrEnd-arrStart<2){
return;
}
int pivotPos =findPivotPos(array,arrStart,arrEnd);
int pivotOrderedPos =partition(array,arrStart,arrEnd,pivotPos);
quickSort(array,arrStart,pivotOrderedPos);
quickSort(array,pivotOrderedPos+1,arrEnd);
}
int main () {
int a[11]={25,1,12,28,3,10,34,56,23,17,80};
return 0;
}