what is the error in my code?
Rat in maze problem
@aditi2512201012019
there are few mistake in your code, i am pointing out them
- mistake in line 17, It should be if(maze[i][j]==βXβ). You have used β=β
- your code is printing all possible paths. So if your rightsuccess is true(i.e there is path in right side), You donβt have to go for leftsuccess. Simply write if(rightsuccess){ return true; } just after line no. 20.
- mistake while printing final outpu. Conditions should be i<=m and j<=n