mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
Add doctest to dijkstra-algorithm
This commit is contained in:
parent
566eacb2b9
commit
82f098612a
@ -14,7 +14,7 @@ def print_dist(dist, v):
|
|||||||
2 3
|
2 3
|
||||||
3 INF
|
3 INF
|
||||||
"""
|
"""
|
||||||
print("\nVertex Distance")
|
print("Vertex Distance")
|
||||||
for i in range(v):
|
for i in range(v):
|
||||||
if dist[i] != float("inf"):
|
if dist[i] != float("inf"):
|
||||||
print(i, "\t", int(dist[i]), end="\t")
|
print(i, "\t", int(dist[i]), end="\t")
|
||||||
|
Loading…
Reference in New Issue
Block a user