I am trying to solve a dijkstra related problem in hackerank. There are total of 9 test cases. My code works fine in all the test cases except test case 7 where the code exc