the 3rd nested for loop shouldn’t be bi=li->n-1 and 4th for loop should be bj=lj->n-1???
Sum of all sub-matrix approach 1
@atishay21 Yes…according to the brute force solution as mentioned in the video, 1 x 1 matrix is not included.
To include that you have to do as you are suggesting. Just begin these loops from top left coordinate values.
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.