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.
I agree with you, I just solved it using DP and it was much more efficient than the BFS solution is. The only tricky part was figuring out the snake part, but a pretty simple recursive function helped me get it. Was a fun problem! I definitely don't think it deserves the "easy" label that the site gives it.
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 →
I agree with you, I just solved it using DP and it was much more efficient than the BFS solution is. The only tricky part was figuring out the snake part, but a pretty simple recursive function helped me get it. Was a fun problem! I definitely don't think it deserves the "easy" label that the site gives it.