MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / minDist

Function minDist

Graphs/dijkstra_2.py:12–19  ·  view source on GitHub ↗
(mdist, vset, V)

Source from the content-addressed store, hash-verified

10 print()
11
12def minDist(mdist, vset, V):
13 minVal = float('inf')
14 minInd = -1
15 for i in range(V):
16 if (not vset[i]) and mdist[i] < minVal :
17 minInd = i
18 minVal = mdist[i]
19 return minInd
20
21def Dijkstra(graph, V, src):
22 mdist=[float('inf') for i in range(V)]

Callers 1

DijkstraFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected