Jump to content

sub-rectangle with the largest sum on N*N array

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
eman ahmed

eman ahmed

    Learning Programmer

  • Members
  • PipPipPip
  • 79 posts
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 : 15

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,

Edited by eman ahmed, 30 July 2010 - 11:07 AM.


#2
eman ahmed

eman ahmed

    Learning Programmer

  • Members
  • PipPipPip
  • 79 posts
I need a help , no one replay untill now :(