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

Method is_empty

data_structures/heap/min_heap.py:123–124  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

121 self.sift_up(len(self.heap) - 1)
122
123 def is_empty(self):
124 return len(self.heap) == 0
125
126 def decrease_key(self, node, new_value):
127 assert self.heap[self.idx_of_element[node]].val > new_value, (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected