1 parent 45a39f6 commit 5d049a2Copy full SHA for 5d049a2
1 file changed
graphs/undirected_graph_weighted.py
@@ -81,8 +81,7 @@ def prim(self):
81
for i in self.get_vertex():
82
weight = start_weight
83
if i == 0:
84
- weight = 0
85
- q.put(([weight, i]))
+ q.put(([0, i]))
86
weights[i] = weight
87
parents[i] = None
88
0 commit comments