Rat Chases its cheese

https://ide.codingblocks.com/s/355338,
please check my code , two test cases are not passing,

Hey @CODER_JATIN
Updated ur code and mentioned the changes in comments: https://ide.codingblocks.com/s/353791

This is not a classical rat in a maze problem,re-read the problem statement

If this resolves ur query then please mark it as resolved :slight_smile:

here the rat can move in up and left direction ? what it make changed from classical rat in a maze problem.

O X O O O
O O O X O
X X X X O

In classic problem there is no solution for this

But in this one solution exist for the above example

Hey @CODER_JATIN
Anything else in this??
If not then please mark it as resolved :slight_smile: