MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / print_solution

Function print_solution

Python/floyd_warshal.py:23–30  ·  view source on GitHub ↗
(distance)

Source from the content-addressed store, hash-verified

21
22# Printing the solution
23def print_solution(distance):
24 for i in range(nV):
25 for j in range(nV):
26 if(distance[i][j] == INF):
27 print("INF", end=" ")
28 else:
29 print(distance[i][j], end=" ")
30 print(" ")
31
32
33G = [[0, 3, INF, 5],

Callers 1

floyd_warshallFunction · 0.85

Calls 1

printFunction · 0.50

Tested by

no test coverage detected