Easy Solution 24ms c++
\nclass Solution {\npublic:\n    int diagonalSum(vector<vector<int>>& mat) {\n        int sum=0;\n        int n=mat.size();\n        for(int i=0;i<n;i++){\n    
```\nclass Solution {\npublic:\n    int diagonalSum(vector<vector<int>>& mat) {\n        int sum=0;\n        int n=mat.size();\n        for(int i=0;i<n;i++){\n            sum=sum+mat[i][i]+mat[i][n-1-i];\n        }\n        if(n%2==1)sum-=mat[(n-1)/2][(n-1)/2];\n        return sum;\n    }\n};\n```
['C', 'C++']