Smoothsort: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m added Category:Heap usando HotCat
Botcrux (discussione | contributi)
m Bot: fix citazione web (v. discussione)
Riga 55:
* If the new heap is going to become part of a larger heap by the time we are done, then don't bother establishing the string property: it only needs to be done when a heap has reached its final size.
** To do this, look at how many elements are left after the new heap of size L(x). If there are more than L(x-1)+1, then this new heap is going to be merged.
 
* Do not maintain the heap property of the rightmost heap. If that heap becomes one of the final heaps of the string, then maintaining the string property will restore the heap property. Of course, whenever a new heap is created, then the rightmost heap is no longer the rightmost and the heap property needs to be restored.
 
Riga 232 ⟶ 231:
==Riferimenti==
<references/>
* [{{cita web|http://www.enterag.ch/hartwig/order/smoothsort.pdf |Commented transcription of EWD796a]}}
 
{{ordinamento}}