//快速排序
int partition(int *a,int low, int high )
{
int temp;
int pivo=a[low];
while(low
while(low
temp=a[high];
a[high]=a[low];
a[low]=temp;
while(low
a[high]=a[low];
a[low]=temp;
}
return low;
}
void QSort(int *a,int low,int high)
{
if(low
int pivotKey=partition(a,low,high);
QSort(a,low,pivotKey-1);
QSort(a,pivotKey,high);
}}
void main()
{
int b[10]={5,3,4,9,7,0,8,1,2,6};
QSort(b,0,9);
for(int i=0;i<10;i++)
printf("%5d",b[i]);
}