diff --git a/primsAlgoCppEfficient b/primsAlgoCppEfficient index 8b4fbd1..05f939a 100644 --- a/primsAlgoCppEfficient +++ b/primsAlgoCppEfficient @@ -26,7 +26,8 @@ int main(){ key[0] = 0; parent[0] = -1; - pq.push({0, 0}); + pq.push({0, 0}); //{key[i], index} + // Run the loop till all the nodes have been visited // because in the brute code we checked for mstSet[node] == false while computing the minimum // but here we simply take the minimal from the priority queue, so a lot of times a node might be taken twice