Quicksort (with bounded stack usage)
(Pascal version available)
sort( r, lo, up )
ArrayToSort r;
int lo, up;
{int i, j;
ArrayEntry tempr;
while ( up>lo ) {
i = lo;
j = up;
tempr = r[lo];
/*** Split file in two ***/
while ( i tempr.k; j-- );
for ( r[i]=r[j]; i