Dijkastra algo ++


pl. check my code geting same output but not able to pass test case

hello @lakshaygarg128
a) declare ur graph inside while loop

b) uncomment this line because given graph is undirected.
image

ur updated code->

1 Like

thanks actually i coment this because some issue and not able to uncomment…i made dist a unordered_map earlier so my test cases where wrong,thanks again :smiley: :grinning: :grinning: :grinning: :grinning: :grinning: :smiley: :smiley: :smiley: :smiley:

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.