Rat in a maze problem

I am not able to rectify my mistake.

if rightsucess is true then simply return true otherwise execute next statements

I am not able to do it.can you rectify the code?


Here did the required changes in your code :slight_smile:
If this resolves your query then please mark it as resolved:)

nope,its not submitting.

yea i just gave you the way to break recursion
your code had many small mistakes like index issue and input was wrong
here is the correct code:


If this resolves your query then please mark it as resolved:)