Subject: Error in yesterday's Recitation

From: Archisman Rudra <[email-masked]>
Date: Wed, 8 Dec 1999 10:05:46 -0500 (EST)

Dear Class,
      There was an error in what I said in the recitation
class yesterday.

       This was for the question on the non-recursive quicksort.
The method I gave in class does not improve the stack depth
beyond a constant number. However, as Rima pointed out to me,
you *can* rearrange the calls to get an asymptotic improvement
in the worst case stack depth.

      The trick is to ensure that for every stack frame,
order the two children so that the one corersponding to the
smaller partition gets popped off first. i.e. push the larger
child before the smaller child.

      You have to prove that this does lead to an asymptotic
improvement.

     Sorry for the whole fiasco, and thanks again to Rima for
correcting the error.

-- Archi