We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Not correct, as the statement says
"No square will have more than one of the starting or ending point of a snake or ladder (e.g. snake 56 to 44 and ladder 44 to 97 is not possible because 44 has both ending of a snake and a starting of a ladder)"
However, Foxkmi is correct, you could have six consecutive short ladders that impede you to reach a large ladder, and theonly way to get that ladder is by the way of a snake.
EG:
ladders
21 to 39,
22 to 38,
23 to 37,
24 to 36,
25 to 35,
26 to 34,
28 to 95
snake
40 to 27
Falling from snake 40 helps you reach the ladder on square 28 that takes you one roll away from the winning square
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Snakes and Ladders: The Quickest Way Up
You are viewing a single comment's thread. Return to all comments →
Not correct, as the statement says "No square will have more than one of the starting or ending point of a snake or ladder (e.g. snake 56 to 44 and ladder 44 to 97 is not possible because 44 has both ending of a snake and a starting of a ladder)" However, Foxkmi is correct, you could have six consecutive short ladders that impede you to reach a large ladder, and theonly way to get that ladder is by the way of a snake. EG: ladders 21 to 39, 22 to 38, 23 to 37, 24 to 36, 25 to 35, 26 to 34, 28 to 95 snake 40 to 27 Falling from snake 40 helps you reach the ladder on square 28 that takes you one roll away from the winning square