AGeek
AGeek

Reputation: 5225

To find Maximum Sum SubMatrix Problem

I have some queries in this problem, so posting it here... I have gone through various solutions available on stackoverflow and other website, but i am still not able to figure out the logic to calculate the same..

If any one can pull-out an example set for the same.. not program, example..... then that could help me in a big way.

URL: http://www.algorithmist.com/index.php/UVa_108

Also, how does maximum subarray problem fit in this solution.. what if all the numbers are negative. in that case what is the result of sum of maximum subarray problem(0 - certainly not)..

Please explain it.. It is a very important question that i am dealing with it right now, and just not able to figure out the example set... After this only, i can design a program..

Thanks.

Upvotes: 0

Views: 1069

Answers (1)

Fred Foo
Fred Foo

Reputation: 363567

If all the numbers are negative, then the maximum submatrix is the 1×1 submatrix containing the largest ("least negative") number.

Upvotes: 1

Related Questions