0ms | Beats 100% complete code
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    long long maxMatrixSum(vector<vector<int>>& matrix) {\n        int mini=INT_MAX;\n        int no_neg=0;\n        long long sum=0;\n        for(auto i:matrix){\n            for(auto j:i){\n                if(j<0) no_neg++;\n                j=abs(j);\n                sum+=j;\n                mini=min(mini,j);\n            }\n        }\n\n        if(no_neg%2==0){\n            return sum;\n        }\n        return sum-2*mini;\n    }\n};\n```
['Array', 'Greedy', 'Matrix', 'C++']