Rat maze problem

here we are not sending soln array by reference so when we return back from subproblem we have the same array(i.e we have 1s till our present location right and the 1s we added in the subproblem will not be there as we did not pass the array by referance) so we dont really need to backtrack (ie convert 1s of subproblem that we added to 0s)

Hey @singhsimran567
Arrays are always passed by reference
So u have to backtrack

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.