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.
For the above mentioned case, 5 moves are required.
42 (tail of snake) gets updated twice. First time because of the ladder 16->61 and second time because of (5->70, 75->62). This happens as per algorithm I described above. Though if you are filling top-down, it would update only once !
Snakes and Ladders: The Quickest Way Up
You are viewing a single comment's thread. Return to all comments →
Oh buddy, in that case I guess our algorithms differ slightly. Consider the following case :
For the above mentioned case, 5 moves are required.
42 (tail of snake) gets updated twice. First time because of the ladder 16->61 and second time because of (5->70, 75->62). This happens as per algorithm I described above. Though if you are filling top-down, it would update only once !