0

I want easy algorithm with minimum order to get the sub-rectangle with the largest sum in an array

for example

array as a input

0 -2 -7 0

9 2 -6 2

-4 1 -4 1

-1 8 0 -2

sub-rectangle

9 2

-4 1

-1 8

maximum sum of its sub-rectangle is : 30

Please I want the idea of this problem beacuse I think too much but I didn't reach to nothing

After thinking long, I found that this sub-rectangle may be include the largest positive number in array but what's the solution if in this sub-rectangle may include negative numbers the maximum of it may largest than the Positive numbers in this sub-rectangle .

sorry for the long thread

thanks,