Google Interview Question

Snake and ladder on Leetcode type question