Skip to content

Commit

Permalink
🧑‍💻 improves prim implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
iagorrr committed Dec 18, 2023
1 parent 04abc40 commit 9ab820b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion algorithms/graphs/prim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ll prim(vi s = vi(1, 0)) {
}

ll mstcost = 0;
while (ingraphcnt < N) {
while (ingraphcnt < N and !pq.empty()) {
ll w;
int v;

Expand Down

0 comments on commit 9ab820b

Please sign in to comment.