Mine 1 test case is failing pls help to identify the mistake in code
1 test case failing
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