BEGINNER FRIENDLY | PYTHON
\nclass Solution:\n    def maxMatrixSum(self, matrix: List[List[int]]) -> int:\n        n = len(matrix[0])\n        total = 0\n        negNum = 0\n        minNe
```\nclass Solution:\n    def maxMatrixSum(self, matrix: List[List[int]]) -> int:\n        n = len(matrix[0])\n        total = 0\n        negNum = 0\n        minNeg = sys.maxsize\n        zero = False\n        minNum = sys.maxsize\n        \n        for i in range(n):\n            for j in range(n):\n                num = matrix[i][j]\n                total += abs(num)\n                if num == 0:\n                    zero = True\n                    \n                minNum = abs(num) if abs(num)< minNum else minNum\n                \n                if num < 0:\n                    negNum += 1\n                    minNeg = minNeg if minNeg<abs(num) else abs(num)\n\n        \n        if negNum % 2 != 0:\n            total = total - (2*minNeg) if minNeg < minNum else total - (2*minNum)\n            \n        return total\n                \n```
[]