标签:排序算法
void quickSort(int a[], int low, int high)
{
if (low <= high)
return;
int i = low;
int j = high;
int key = a[i];
while (i < j)
{
while (i < j && a[j] >= key)
--j;
a[i] = a[j];
while (i < j && a[i] <= key)
++i;
a[j] = a[i];
}
a[i] = key;
quickSort(a, low, i - 1);
quickSort(a, i + 1, high);
}
标签:排序算法
原文地址:http://sharep.blog.51cto.com/539048/1919650