Rat Chases its cheese Problem

Hi. I am getting 2 wrong answers to this question. I have just added more cases for upward and leftward movement in the usual approach. Here is the code for it: https://ide.codingblocks.com/s/666178
Can you please help me out with this
Thank You!

hi @Vinayak-Bhardwaj check if the soln matrix is no 1 in all the if conditions

Yes, it worked. Thank You @talhashamim001

1 Like

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.