RatInMaze(backtracking)

what is wrong in this code

hey @Tiya, you have skipped backtracking step, interchanged m and n, read matrix at wrong position.
I have made changes to your code, you can check them here https://ide.codingblocks.com/s/131015
But I suggest you to go through the video lecture once to understand the approach.

but in the vdo they had to print all the possible ways so after marking in the 1st time they had to make everything equal to 0 but in this case only one path has to be printed so why would we need to make the 1s 0 again.On encountering a deadend we r returning false so wont that suffice?also does returning false when there is a block ahead also considered as backtracking?

hey @Tiya, I answered your query as per the question where you need to print one path only, For printing all the paths you can refer to video thats also fine.

this getting runtime error

hey @Tiya, share the code which is giving run error and if you are implementing it on some question than please share the question link too.
And please share the code saved in Coding blocks ide as text gets mismatched here.

hey @Tiya, first of all sorry for the late reply, These days we TAs are busy in our placement.
Please refer to this thread RAT IN A MAZE--runtime error in test cases

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.

@gaurav13998 can u plz help me out i m not able to understand the error in the code

hey @Tiya, please share me your most upadated code saved in Coding Blocks ide

hey @Tiya, there was small mistake while taking m and n in your code, m is for row and n is for col.
I have made these changes to your code, you can check them here https://ide.codingblocks.com/s/137779