MindTickle interview question

Rat in a maze problem Dynamic programming