Example solution wrong?


#1

The solution for 1st example is wrong. The submatrix with largest sum is 5x5 matrix. The full matrix itself


#2

you misunderstood the question! you have to find maximum sum square sub matrix of given size B.