Snakes and Ladders using Dijkstra's algo