Dijkstra's Algorithm

i am getting a run-error in the test case but the sample case works fine.
link:

Hello @rahulgoindi15

The array “aa” should be of the size 3001 and the number of vertices can be 3000.
Convert all “int” to “long long int” because when you add “nodeDist + childPair.second”, childPair.second could be INT_MAX and the sum could go negative.

Here is the modified code

If you still need any help, leave a reply and I will help you out.

thank you! I got it.