Snakes and Ladders from HackerRank--Dynamic Programming