MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __init__

Method __init__

data_structures/heap/min_heap.py:34–37  ·  view source on GitHub ↗
(self, array)

Source from the content-addressed store, hash-verified

32 """
33
34 def __init__(self, array):
35 self.idx_of_element = {}
36 self.heap_dict = {}
37 self.heap = self.build_heap(array)
38
39 def __getitem__(self, key):
40 return self.get_value(key)

Callers

nothing calls this directly

Calls 1

build_heapMethod · 0.95

Tested by

no test coverage detected