Doubt doubt doubt

why, Bi = li +1 and Bj =lj +1 ???

Bi should start from li and Bj should start from lj.
Otherwise, single matrix to count he nahi ho paenge.

yes you are correct

may be in code sir corrected this why my programme is not working ??

Modified Code

there should be equality when you are summing the matrix

still not working…

you have to inc j in last loop not i
Modified code

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.