having hard time dealing with an extral 1 at a[1][2] position
here’s code
Rat in a maze recursion Backtracking
Hi @Vivek-Pandey-2129725577345937
See in your code when you are computing downsuccess and when you get downsuccess as false then you are returning false in the else case without making b[i][j] as 0 because in this case we did not get from visiting right and as well as visiting the bottom cell. So correcting required in your code is that you add b[i][j] in the else condition before returning false.
Here is your corrected code :