Pergunta de entrevista da empresa Jane Street

Snakes and ladders variant coding question