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

Method peek

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

Source from the content-addressed store, hash-verified

100 p = self.get_parent_idx(idx)
101
102 def peek(self):
103 return self.heap[0]
104
105 def remove(self):
106 self.heap[0], self.heap[-1] = self.heap[-1], self.heap[0]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected