Simple and Clean Solution ✅✅
Code\ncpp []\nclass Solution {\npublic:\n    long long maxMatrixSum(vector<vector<int>>& matrix) {\n        int n=matrix.size();\n        int minu=INT_MAX;\n   
# Code\n```cpp []\nclass Solution {\npublic:\n    long long maxMatrixSum(vector<vector<int>>& matrix) {\n        int n=matrix.size();\n        int minu=INT_MAX;\n        int count=0;\n        long long ans=0;\n        for(int i=0;i<n;i++){\n            for(int j=0;j<n;j++){\n                if(matrix[i][j]<0){\n                    count++;\n                }\n                minu=min(minu,abs(matrix[i][j]));\n                ans+=abs(matrix[i][j]);\n            }\n        }\n        if(count%2!=0){\n            ans-=2*minu;\n        }\n        return ans;\n    }\n};\n```
['Greedy', 'Matrix', 'C++']