Snake and ladder problem

Hello,
I coded the problem, snakes and ladders, and the first time I run it, it gives me the correct output but during submission i got wrong answer . Could you help me to figure out what is the problem in the code
Here is the code Link

start i from 1 not 0.
Also why you are creating an egde from 100 to 100, no need to do it.
Also take the size of bd a little large in case the input is something messy.

Try doing these changes in your code, it will be accepted.

Thanks bro ! after modification code is accepted

1 Like