Dijkstra's Algorithm

Why is it showing error?

hello @anindya-gupta

is it showing wa?

pls check ur updated code here->

yeah it’s working now. But what was the error in the way I was doing?

i have added the comment in the code.

u need to print distance in order {1,2,3…} execpt source but u were printing in some other order

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.