Getting wrong in Shortest Source to Destination Path Problem.

I tried to solve Shortest Source to Destination Path Problem. But getting error.
Please tell me where is the wrong . I tried to find out but failed in a case.

Here My code :

you are missing the case where there are many possible ways to reach (x,y) and you have to choose minimum cost.

1 Like

I edited code but getting error.Please help me.

//