include [HTML_REMOVED]
int onesort(int a2[], int left, int right)
{
int pivot = a2[left];
while (left < right)
{
while (left < right && a2[right] >= pivot)
right–;
a2[left] = a2[right];
while (left < right && a2[left] <= pivot)
left++;
a2[right] = a2[left];
}
a2[left] = pivot;
return left;
}
void quick_sort(int a1[], int left, int right)
{
if (left < right)
{
int pivot = onesort(a1, left, right);
quick_sort(a1, left, pivot - 1);
quick_sort(a1, pivot + 1, right);
}
}
int main()
{
int x = 6;
scanf(“%d”, &x);
int a[x];
int i;
for (i = 0; i < x; i)
scanf(“%d”, &a[i]);
quick_sort(a, 0, x - 1);
for (i = 0; i < x; i)
printf(“%d “, a[i]);
return 0;
}