void quicksort(Item a[], int l, int r) { int i = l-1, j = r; Item v = a[r]; if (r <= l) return; for (;;) { while (a[++i] < v) ; while (v < a[--j]) if (j == l) break; if (i >= j) break; exch(a[i], a[j]); } exch(a[i], a[r]); quicksort(a, l, i-1); quicksort(a, i+1, r); }