Leetcode some test cases passed

Problem:https://leetcode.com/problems/snakes-and-ladders/description/
Solution:
https://ide.codingblocks.com/s/688654