Hipsort — разлика између измена
Садржај обрисан Садржај додат
м Робот: додато {{Commonscat|Heap sort}} |
м Разне исправке |
||
Ред 69:
Skini max sa hipa(i - 1)
end
Algoritam Skini max sa hipa(A; n);
Линија 106 ⟶ 105:
njega. Novi element se premešta naviše, sve dok ne postane manji ili jednak
od oca, ili dok ne dospe u koren hipa. Broj upoređivanja je u najgorem slučaju log<sub>2</sub>(i+1).
'''Induktivna hipoteza (odozdo nagore)'''
Линија 216 ⟶ 214:
== Literatura ==
* {{Citation |first=Miodrag |last=Živković |title=Algoritmi |
* {{Citation |first=J. W. J. |last=Williams |title=Algorithm 232 - Heapsort |year=1964 |journal=Communications of the ACM |volume=7 |issue=6 |pages=
* {{Citation |first=Robert W. |last=Floyd |title=Algorithm 245 - Treesort 3 |year=1964 |journal=Communications of the ACM |volume=7 |issue=12 |pages=701 |doi= }}
* {{Citation |first=Svante |last=Carlsson |title=Average-case results on heapsort |year=1987 |journal=BIT |volume=27 |issue=1 |pages=
* {{Cite book
* -{Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. ''Introduction to Algorithms'', Second Edition. MIT Press and McGraw-Hill, {{page|year=2001
* [http://www.cs.utexas.edu/users/EWD/ewd07xx/EWD796a.PDF -{A PDF of Dijkstra's original paper on Smoothsort}-]
* [https://web.archive.org/web/20070430072206/http://cis.stvincent.edu/html/tutorials/swd/heaps/heaps.html -{Heaps and Heapsort Tutorial] by David Carlson, St. Vincent College}-
|