分类: C/C++
2008-10-17 17:17:29
void
quicksort(int l, int u){
int i, m;if (l >= u)
return;//swap(l, randint(l, u));
m = l;
for (i = l + 1; i <= u; i++)
if (x[i] < x[l]) swap(++m, i);swap(l, m);
quicksort(l, m - 1);
quicksort(m + 1, u);
}
from <