Mobileye interview question

403. Frog Jump from leetcode