Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ __getitem__
Method
__getitem__
data_structures/heap/min_heap.py:39–40 ·
view source on GitHub ↗
(self, key)
Source
from the content-addressed store, hash-verified
37
self.heap = self.build_heap(array)
38
39
def
__getitem__(self, key):
40
return
self.get_value(key)
41
42
def
get_parent_idx(self, idx):
43
return
(idx - 1) // 2
Callers
nothing calls this directly
Calls
1
get_value
Method · 0.95
Tested by
no test coverage detected