ThoughtSpot interview question

Snake and ladders question from leetcode or gfg