Dijkstra's Algorithm

In the lecture video where we are inserting the node 2,3,4 in the set?

Hey @samardeep yes, we are inserting the node 2,3,4 in the set

where we r inserting?? I didn’t find any line in the code?

In explanation part bhaiya has explained by taking set, but while implementing he has taken unordered_map of key and adjacency list in add edge function. I thought you were asking for explaination part. That’s why i said it. Hope this will clear your doubt :slight_smile:

I am asking, I didn’t find any line where he is inserting 2,3,4 node in set.In the addEdge function he is just storing the key and values pairs.

You can refer this code as in bhaiya’s code he has made it using template and not for map he has shown for explanation. I have coded for explanation’s one


I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.