Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ print_dist
Function
print_dist
graphs/dijkstra_2.py:1–8 ·
view source on GitHub ↗
(dist, v)
Source
from the content-addressed store, hash-verified
1
def
print_dist(dist, v):
2
print(
"\nVertex Distance"
)
3
for
i in range(v):
4
if
dist[i] != float(
"inf"
):
5
print(i,
"\t"
, int(dist[i]), end=
"\t"
)
6
else
:
7
print(i,
"\t"
,
"INF"
, end=
"\t"
)
8
print()
9
10
11
def
min_dist(mdist, vset, v):
Callers
1
dijkstra
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected