Rat in maze ques

hello @singhsimran567

a) handle this case->
image

b)

image

add one more base case to handle invalid calls.
i.e add this at very top

if(x<0 || x>xf || y<0 || y>yf) return false; 


still showing error

@singhsimran567
check now->

dont manipulate the same char array.

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.