RAT IN MAZE question

I tried solving this. but i dont know why its printing many times and run error is also coming.

hello @mittali

check now

why do we need to check the before downside. because in upper video it wasnt checked

because after backtracking we are checking

to avoid multiple output …

we are checking whether path is already found or not.
if found then simply return from there

i got it and thank you

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.