DP27, CODE, 2D version of Kadane