Beats 100 % || Simple and easy to understand || C++
\n\n# Code\n\nclass Solution {\npublic:\n    int diagonalSum(vector<vector<int>>& mat) {\n        int m = mat.size() ,sum=0;\n        for(int i=0;i<m;i++){\n   
\n\n# Code\n```\nclass Solution {\npublic:\n    int diagonalSum(vector<vector<int>>& mat) {\n        int m = mat.size() ,sum=0;\n        for(int i=0;i<m;i++){\n            sum += mat[i][i] + mat[i][m-i-1];\n        }\n        if(m % 2 != 0) sum -= mat[m/2][m/2];\n        return sum;\n    }\n};\n```
['C++']