Skip to content

Commit 970d9b8

Browse files
committed
Update dijkstra_2.py
1 parent c242af4 commit 970d9b8

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

graphs/dijkstra_2.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,8 @@ def dijkstra(graph, v, src):
6868
0 0
6969
1 INF
7070
>>> dijkstra([[0.0]], 1, 0)
71-
Exception raised:
72-
Traceback (most recent call last):
73-
...
74-
UnboundLocalError: cannot access local variable 'i' where it is not associated with a value
71+
Vertex Distance
72+
0 0
7573
"""
7674
mdist = [float("inf") for _ in range(v)]
7775
vset = [False for _ in range(v)]

0 commit comments

Comments
 (0)