easy approach
looks for occourance of neagtive numbers is it even times or odd times and check for zero appearance\n\n# Code\ncpp []\nclass Solution {\npublic:\n    long long
**looks for occourance of neagtive numbers is it even times or odd times and check for zero appearance**\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    long long maxMatrixSum(vector<vector<int>>& matrix) {\n        long long ans=0,k=INT_MAX,count=0,zero=0;\n        for(int i=0;i<matrix.size();i++){\n            for(int j=0;j<matrix.size();j++){\n               if(k>abs(matrix[i][j])) k=abs(matrix[i][j]);\n               ans+=abs(matrix[i][j]);\n               if(matrix[i][j]<0) count++;\n               if(matrix[i][j]==0) zero=1;\n          }\n        }\n        // cout<<k<<" "<<count<<" "<<ans; \n        if(!(count&1) || zero) k=0;\n        return ans-2*k;\n    }\n};\n```
['Array', 'Greedy', 'Matrix', 'C++']