Java simple
If the matrix contains even number of negative numbers, return sum (of abs values)\nelse return sum(of abs values) - min of abs values * 2\n\n\npublic long maxM
If the matrix contains even number of negative numbers, return sum (of abs values)\nelse return sum(of abs values) - min of abs values * 2\n\n```\npublic long maxMatrixSum(int[][] matrix) {\n\tlong sum = 0, count = 0, min = Integer.MAX_VALUE;\n\tfor(int i=0;i<matrix.length;i++)\n\t\tfor(int j=0;j<matrix[0].length;j++) {\n\t\t\tif(matrix[i][j] < 0) {\n\t\t\t\tcount++;\n\t\t\t\tmatrix[i][j] *= -1;\n\t\t\t}\n\t\t\tmin = Math.min(min, matrix[i][j]);\n\t\t\tsum += matrix[i][j];\n\t\t}\n\treturn count%2!=0 ? sum-min*2 : sum;\n}\n```
[]