HashedIn by Deloitte interview question

code for snake-ladder problem