I have a syntax doubt

sir, at time 9:15, in line no. ‘6’ , how can the value of ‘i’ & ‘j’ be ‘m’ and ‘n’. because, i think, i should me ‘m-1’ & ‘n-1’.

hello @chandreshmaurya

yeah correct, and that is why we are passing m-1 and n-1 in place of m and n , in line 58.

sir, at 13:51 ,in line 27, when we are doing the backtracking, is it mean all the element of matrix will be zero ?

not all , when we arrived at (i,j) sol[i][j] was 0.
we set it to 1. and then we tried finding the way from here onwards.
but we didnt find it , so while returning it our responsibiliy to undo the changes that we did while arriving .
that is why we are doing sol[i][j]=0; // we also call this backtracking

oohk sir. i got your point. thank you sir.

sir, my second doubt please

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.

yeah tell me …

thank sir, now, all doubt have been cleared.