Topic: Problem Solving on 2d arrays -video no:1

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?

hi @todeepakkumar1911_bbed4acf319b38dd
u can refer this code -->

1 Like

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.

1 Like