Backtracking steps in rat in maze problems

Correct me …