My code is not passing tow test cases?

@Deepanshu_garg hey deepanshu I think your code have same issue go to this discuss if it not resolved then ping me
move to this discuss.

The code is not running ?

Please check if there is any mistake in my code which i send you earlier as there is no difference between my code and code you posted

@Deepanshu_garg hey deepanshu yeah there is difference but I have suggested some changes in that post down below go and check out actually you have to check before making a call for vaild path made same modification you code will work fine.

Suppose if i make a call if not possible it will return false so why to make this change

@Deepanshu_garg hey deepanshu I bit confuse is that code belong to rat in maze problem or rat chases it cheese.

Rat chases its cheese

@Deepanshu_garg hey deepanshu your code is giving wrong output for
4 5
OOXXX
OXOOO
OXOXO
OOOXO
your output is
No path found
but should be
1 0 0 0 0
1 0 1 1 1
1 0 1 0 1
1 1 1 0 1
so please try to handle this case.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.