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

Function printDist

Graphs/bellman_ford.py:3–10  ·  view source on GitHub ↗
(dist, V)

Source from the content-addressed store, hash-verified

1from __future__ import print_function
2
3def printDist(dist, V):
4 print("\nVertex Distance")
5 for i in range(V):
6 if dist[i] != float('inf') :
7 print(i,"\t",int(dist[i]),end = "\t")
8 else:
9 print(i,"\t","INF",end="\t")
10 print()
11
12def BellmanFord(graph, V, E, src):
13 mdist=[float('inf') for i in range(V)]

Callers 1

BellmanFordFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected