Skip to content

Commit b8a38de

Browse files
committed
Update var names
1 parent 776cbaf commit b8a38de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/code/python/graph/prim.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ def prim_mst(n: int, edges: list[tuple[int, int, int]]) -> list[tuple[int, int,
99
pq = [(w, u, v) for w, u, v in edges]
1010

1111
while pq:
12-
weight, u, v = heappop(pq)
12+
w, u, v = heappop(pq)
1313

1414
if not uf.connected(u, v):
1515
uf.union(u, v)
16-
mst.append((weight, u, v))
16+
mst.append((w, u, v))
1717

1818
return mst

0 commit comments

Comments
 (0)