Snake and ladder

not able to debug my code ,it is showing wrong answer in second test case.

@rohit2299 you have to print -1 if there is no solution, you are printing 0 instead of -1.