Snack and ladder problem


what is the error i am getting only 30 instead of all path

Increase your size of board to n+10. As you are adding a value of dice and it might overflow