Rat in a maze problem

what can i do so that only one output gets print;


see first i have checked can it move right? so i move right and check if that is a possible state to reach the end.
if not then i move down and do the same
if i can neither move down nor right or it cannot be solved i set this path to zero and then return false from this state
next i print soln only in the main to print only the correct answer

can you please modify the code

your code is wrong its not working

hey, that is because, i have fixed the logic u will have to fix the constraints
the current error is that of going out of bound
you should understand the logic
i am not supposed to give u the entire submittable code, otherwise your learning won’t be enough

Nonetheless


just the constraints are changed, not the logic
@royprincejmp if your doubt is solved, please mark it as resolved