Sorting algorithms/Heapsort: Difference between revisions
J: minor cleanup
(+Icon+Unicon) |
(J: minor cleanup) |
||
Line 738:
{{eff note|J|/:~}}
'''Translation of the pseudocode'''
<lang j>
siftDown=: 4 : 0
if.
if. s before c do. y=. (c,s) swap y else. break. end.
y
)
heapSort
)</lang>
'''Examples'''
|