Rat in maze problem


i am getting soo many errors in this code.
Kindly comment out my logical/syntactical errors.

Hello @mkidwai74 check this corrected code:

The purpose of the count is that once it is greater than or equal to 1 we return true and stop printing more paths??
image

@mkidwai74 yes right. because we have to print the rightmost path only.

image
also does it matter if soln[i][j] statement is written before if block rather than after ?

I think it would not matter but it is my habbit so i changed that while correcting.
you can check it.
it should work in that way as well.

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.