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.
Hey thanks a lot for this approach, I had written something similar :) Had missed certain conditions! This works perfectly fine! Kudos for nice explanation! Need to look out for some tricky cases to print -1!!
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 →
Hey thanks a lot for this approach, I had written something similar :) Had missed certain conditions! This works perfectly fine! Kudos for nice explanation! Need to look out for some tricky cases to print -1!!