Dijkstra's algorithm

The sample test case is giving the correct output but on submitting it is not passing.

Plzz check

Your submission shows that all your testcases were passed. Check once.

I have submited another code that i have written but plz tell my mistake in the code as shown above

plzzz reply, plz ek baar code check karlo

In the question it was mentioned that you have to print the distance in increasing order of their labels.
I dont think so you are considering this. So instead of taking unordered map,you can take as ordered map to print the result in increasing order of labels.
Cross check with this code. Comments will help https://ide.codingblocks.com/s/266660

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.