Skip to content

Commit 70e605b

Browse files
committed
clarify comment
1 parent 1507c47 commit 70e605b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graph/prim.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const prim = (graph: [number, number][][]): [Edge[], number] => {
2424
add_children(graph, priorityQueue, 0);
2525

2626
while (!priorityQueue.isEmpty()) {
27-
// We always store the previously visited edge in `edge.a`, and the newly visited node in `edge.b`.
27+
// We have already visited vertex `edge.a`. If we have not visited `edge.b` yet, we add its outgoing edges to the PriorityQueue.
2828
let edge = priorityQueue.extract();
2929
if (visited.has(edge.b)) {
3030
continue;

0 commit comments

Comments
 (0)