From 80e328b11fffee9f548da426fef3710c04a93321 Mon Sep 17 00:00:00 2001 From: H GURURAGHAVENDRA <51516878+guru-raghavendra@users.noreply.github.com> Date: Sat, 23 Oct 2021 08:59:36 +0530 Subject: [PATCH] updated a comment for better understanding updated comment for what is stored in priority queue --- primsAlgoCppEfficient | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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