can someone please explain this brute froce and send the brute froce code of this sum of all sub arrays question
Couldnt usnderstand the brute force
this is my code it is not giving the desired result
Refer this code.
According to the brute force solution as mentioned in the video, 1 x 1 matrix is not included.
To include that you just have to modify the loops for bottom right coordinates. Just begin these loops from top left coordinate values.
for(int bi=li+1;bi<n;bi++){
for(int bj=lj+1;bj<n;bj++){
These must start from li and lj.