Easy solution, Beats 100% runtime
Intuition\nThe negatives can be reduced to count 0 and 1. Depending on the number of negatives in the matrix. Two negatives can lead to a positive number, where
# Intuition\nThe negatives can be reduced to count 0 and 1. Depending on the number of negatives in the matrix. Two negatives can lead to a positive number, whereas when only one negative is left it cann\'t be changed to a positive number. \n\n> [-1, -1]     ->[-1, 1]\n> [1 ,-1 ]      -> [1 , 1]\n# Approach\n- keeping track of the least absolute value in case when turning the entire matrix to positive is not possible.\n- if negative count still exists (negative count is odd) then the number shouldn\'t be counted.  \n> ans  = Sum - 2*minAbsoluteValue   \n twice the minAbsoluteValue because it has already been added in the sum.\nOne is to reduce it and the another is to add the negative value of it.\n\n- if the negatives count is even, then all elements will eventually turn to positive. \n>ans = sum \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 minV = INT_MAX;\n        bool neg = false;\n        long long sum  =0 ; \n        for(int i=0 ; i<matrix.size(); i++){\n            for(int j=0 ; j<matrix[0].size(); j++){\n                if(matrix[i][j]<0){\n                    neg = !neg;\n                    sum-=matrix[i][j];\n                    minV = min(minV, -matrix[i][j]);\n                }\n                else{\n                    sum+=matrix[i][j];\n                    minV = min(minV, matrix[i][j]);\n                }\n                \n            }\n        }\n        if(neg) return sum - 2*minV; \n        else return sum ;\n    }\n};\n```
['C++']