Find max sum of sub array for a 2-dimensional array