HashedIn by Deloitte Interview Question

Snake and ladder game logic in dynamic programming