MCPcopy Create free account
hub / github.com/ActiveState/code / build_heap_max

Function build_heap_max

recipes/Python/577688_heap_sort/recipe-577688.py:15–18  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

13 break
14
15def build_heap_max(array):
16 length = len(array)
17 for i in xrange(length / 2, -1, -1):
18 heapify(array, i, length, max)
19
20def heap_sort(array):
21 build_heap_max(array)

Callers 1

heap_sortFunction · 0.85

Calls 2

xrangeClass · 0.85
heapifyFunction · 0.70

Tested by

no test coverage detected