Professional Documents
Culture Documents
#includeiostream
#includecstdlib
#includectime
using namespace std;
while (i = j)
{
while (Q[i] pivot)
i++;
while (Q[j] pivot)
j--;
if (i = j)
{
swap(Q[i], Q[j]);
i++;
j--;
}
}
if (left j)
quicksort(Q, left, j);
if (right i)
quicksort(Q, i, right);
}
}
int main()
{
khai bao bien
#define MAX 10000
int a = 0;
int A[MAX];
srand(time(0));
quicksort(A, 1, MAX);
cout endl;
system(pasue);
cout endl;
system(pause);
return 0;
}