About Me

My photo
Mostly software programming related blogs.

Thursday, October 25, 2012

Find sub matrix with maximum sum

Suppose you have an NxN matrix of positive and negative integers. Write a code that finds the sub-matrix with the maximum sum of its elements.

or 

Bit less difficult  variant

Given a m * n matrix and value k. Find k * k matrix within the given matrix whose sum is maximum.

No comments: