Snakes and Ladders

Return the minimum number of moves to reach the last square or -1 if impossible.

Examples
Input: [[-1,-1,-1,-1,-1,-1],[-1,-1,-1,-1,-1,-1],[-1,-1,-1,-1,-1,-1],[-1,35,-1,-1,13,-1],[-1,-1,-1,-1,-1,-1],[-1,15,-1,-1,-1,-1]]
Output: 4
Hints

Snakes and Ladders

Return the minimum number of moves to reach the last square or -1 if impossible.