when we reached i==m and j==n we did that cell to be 1 and printed for the solution but we didn’t backtracked it to zero, am i wrong?
Backtracking of 1 in the base case?
at that point after printing we simply get out of the function without backtracking
we dont need to backtrack at that point
backtracking is necessary when u need some other option to take place but here since the solution is done no need to bcktrack
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.