Easy to Understand Code [C++]  Using Two pointers
\nclass Solution {\npublic:\n    int diagonalSum(vector<vector<int>>& mat) {\n        int start =0;\n        int end = mat.size() - 1;\n        int sum =0;\n   
```\nclass Solution {\npublic:\n    int diagonalSum(vector<vector<int>>& mat) {\n        int start =0;\n        int end = mat.size() - 1;\n        int sum =0;\n        for(int i=0; i<mat.size(); i++)\n        {\n            if(start > (mat.size() - 1) && end < 0)\n                break;\n            sum += mat[start++][i];\n            sum += mat[end--][i];\n        }\n        if(mat.size() % 2 != 0)\n        {\n            int mid = (mat.size() - 1) / 2;\n            sum -= mat[mid][mid];\n        }     \n        return sum;\n    }\n};\n```
['C', 'C++']