heap doesn't appear to work as described
bbxx789_05ss at yahoo.com
Wed Apr 4 10:45:43 CEST 2007
On Apr 3, 10:30 pm, "Terry Reedy" <tjre... at udel.edu> wrote:
> <s... at pobox.com> wrote in message
> news:17938.58082.317522.331513 at montanaro.dyndns.org...
> | >> My book says that in a heap, a value at position i will be smaller
> | >> than the values at positions 2*i and 2*i + 1.
> I am sure your book either uses 1-based arrays or a 0-based arrays with the
> first not used. The need to keep these alternatives in mind is an
> unfortunate fact of programming life.
My book uses lists.
More information about the Python-list