Sorting algorithms/Heapsort: Difference between revisions

m
added FunL
(Added zkl)
m (added FunL)
Line 923:
while root*2 + 1 <= end
child = root*2 + 1
 
if child + 1 <= end and a(child) < a(child + 1)
child++
 
if a(root) < a(child)
a(root), a(child) = a(child), a(root)
Anonymous user