Snake and Ladder, problem in code


Please tell me what’s the error in this code.

Hello @pratyush34,

I have corrected your code:

Refer to comments for better understanding.

Hope, this would help.
Give a like if you are satisfied.

You clearly haven’t read the question first. Your input format is totally wrong. I suggest you to carefully read the input format first.

Note - I wrote code not for this video but for the Snake and ladder problem on Hacker blocks.

https://hack.codingblocks.com/app/practice/1/6/problem

Hello @pratyush34,

I have corrected your code:


Refer to comments.

Let me know if you don’t understand something.