Rat chases its cheese

https://ide.geeksforgeeks.org/Nr8fkY7xd0
I am failing 2 test cases here what is the mistake in this code ?

@abhishekjohri98,

Sample Test case:
5 6
OXOOOO
OXOXOX
OXOXOO
OOOXOX
XXOXOO

Correct Output:
1 0 1 1 1 0
1 0 1 0 1 0
1 0 1 0 1 0
1 1 1 0 1 0
0 0 0 0 1 1

Your Output:
NO PATH FOUND

Add condition for solveMaze(v, sol, i, j - 1, m, n); and solveMaze(v, sol, i-1, j , m, n); Also put a base case to prevent i and j to go below 0.

Hi can you help me here I am not able to apply the base case here.

I made required changes in your code: https://ide.codingblocks.com/s/210352

thanks

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.