We have implemented 6 loops to find the sum of all submatrices. As explained by the mentor the third and fourth loop should start from li+1 and bi lj+1. My doubt is that if we start these loops from above mentioned indices we will miss all 1X1 matrices. So i think it should should start from li and lj. is it right?
u can refer this 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