It can be i=m-1 and j==n-1 because m-1 and n-1 are the last index of matrix and (m,n) will be outside of the matrix na?
And one more doubt is how we can be able to get this type of Logic on our own?
It can be i=m-1 and j==n-1 because m-1 and n-1 are the last index of matrix and (m,n) will be outside of the matrix na?
And one more doubt is how we can be able to get this type of Logic on our own?
@gvspraveen113 see time stamp 15.20 m actually contains m-1 only as m-1 is passed from main (same for n)
you will be able to do these type of questions after going through some of these like this one sudoku solver n queen etc
dont forget to hit like and mark resolved if cleared 
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.