Eleviant Tech interview question

Backtracking problem (mice to reach the cheese)