Rat in maze problem


what is the error in my code?

@aditi2512201012019
there are few mistake in your code, i am pointing out them

  1. mistake in line 17, It should be if(maze[i][j]==β€˜X’). You have used β€œ=”
  2. 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.
  3. mistake while printing final outpu. Conditions should be i<=m and j<=n

@aditi2512201012019
Here is the update code as per above mistakes. please check