Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/subbarayudu-j/TheAlgorithms-Python
/ par
Method
par
Graphs/dijkstra_algorithm.py:58–60 ·
view source on GitHub ↗
(self, i)
Source
from the content-addressed store, hash-verified
56
return
2 * i + 2
57
58
def
par(self, i):
59
# returns the index of parent
60
return
math.floor(i / 2)
61
62
def
swap(self, i, j):
63
# swaps array elements at indices i and j
Callers
1
decrease_key
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected