Add doctest to dijkstra-algorithm

This commit is contained in:
lubaso 2023-10-07 00:55:55 -03:00
parent 82f098612a
commit 45baaf74a9

View File

@ -14,12 +14,12 @@ def print_dist(dist, v):
2 3
3 INF
"""
print("Vertex Distance")
print("\nVertex Distance")
for i in range(v):
if dist[i] != float("inf"):
print(i, "\t", int(dist[i]), end="\t")
print(i, int(dist[i]), end=" ")
else:
print(i, "\t", "INF", end="\t")
print(i, "INF", end=" ")
print()