On Fri, Jul 27, 2001 at 08:38:13AM +0200, Abigail wrote:
> On Fri, Jul 27, 2001 at 12:13:45AM -0400, Andrew Pimlott wrote:
> > (The original works, by chance.)
>
> Nah, not by chance. It works fine. It's just that the top element of
> the heap only has one child - but that doesn't matter for the algorithm
> to work. ;-)
It's not chance that it happens to sort any particular list, but it
is chance that you picked a mistake that wouldn't affect
correctness. Or maybe you were copying from a Pascal book. ;)
Andrew