MCPcopy Index your code
hub / github.com/OmkarPathak/pygorithm / pop

Method pop

pygorithm/data_structures/heap.py:65–72  ·  view source on GitHub ↗

Removes the lowest value element (highest priority, at root) from the heap

(self)

Source from the content-addressed store, hash-verified

63 parent = self.parent_idx(child)
64
65 def pop(self):
66 """
67 Removes the lowest value element (highest priority, at root) from the heap
68 """
69 min = super().dequeue()
70 if self.rear >= 1: # heap may need to be fixed
71 self.heapify_down()
72 return min
73
74 def favorite(self, parent):
75 """

Callers 8

test_heapMethod · 0.95
_iter_helperMethod · 0.45
dequeueMethod · 0.45
delete_rearMethod · 0.45
delete_frontMethod · 0.45
__create_group_listFunction · 0.45
searchFunction · 0.45

Calls 2

heapify_downMethod · 0.95
dequeueMethod · 0.80

Tested by 1

test_heapMethod · 0.76