快排过程中参数会是负数?
void QSort(int l, int r){ int lp = l, rp = r, key = (l + r) >> 1; while (lp < rp) { while (a[lp] < key) lp++; while (a[rp] > key) rp--; if (lp <= rp) swap(&a[lp++], &a[rp--]); } if (l < rp) QSort(l, rp); if (lp < r) QSort(lp, r);}
while (a[lp] < key) lp++; while (a[rp] > key) rp--;