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.
Ah, I see what shivaaryan_p7475 is saying. He says you can't JUST count for 6 consecutive snakes, because even if Square 10 to Square 90 is ALL SNAKES, you could still have 1 ladder that goes from square 2 to square 99, and win easily.
But there will never be 0 ladders. The problem states this clearly.
"1 <= Number of Ladders <= 15"
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 →
Ah, I see what shivaaryan_p7475 is saying. He says you can't JUST count for 6 consecutive snakes, because even if Square 10 to Square 90 is ALL SNAKES, you could still have 1 ladder that goes from square 2 to square 99, and win easily.
But there will never be 0 ladders. The problem states this clearly.
"1 <= Number of Ladders <= 15"