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

Method peek

data_structures/heap/binomial_heap.py:247–251  ·  view source on GitHub ↗

return min element without deleting it

(self)

Source from the content-addressed store, hash-verified

245 next_node.left = self.bottom_root
246
247 def peek(self):
248 """
249 return min element without deleting it
250 """
251 return self.min_node.val
252
253 def is_empty(self):
254 return self.size == 0

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected