i get correct output yet code is not being accepted
Dijkstra's Algorithm code not being accepted
Hello @khushipriya681,
There are two issues in your program:
-
Your program is printing the output of different testcases in the same line.
-
For sum unreachable nodes(INT_MAX ), it is printing negative values instead of (-1).
I have modified your code:
It is passing the test case.
I have also specified the test case for which it is giving wrong value.
Find the difference and correct it.
Hope this would help.
Give a like, if you are satisfied.
1 Like