Rat chases its cheese


not passes all test cases

@ajayrajsingh_817
there is one problem with your approach
suppose if at some cell in the middle of board we are not able to move forward
so we return false from that cell but from the previous cell we are returning true which is wrong

your code will give wrong ans for the input
5 7
OXOOOOX
OXOXOXX
OXOXOOX
OOOXOXX
XXOXXXX

can you plzz correct my code

and explain me about unique path that is used in question if we change the direction then there exist unique path or not