BFS : Shortest path

I am getting Wrong answer in one test case. Please help me to find the mistake.

question link: https://online.codingblocks.com/app/player/51476/content/56868/5090/code-challenge

my code :https://ide.codingblocks.com/s/218712

Hi @Rememberthename, since the graph is undirected and egde distance is equal thus , you can simply use BFS instead of dijstra’s refer this BFS Shortest path