MAQ Software Interview Question

Snake and ladder problem