C++ SOLUTION || EASY TO UNDERSTAND
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:\nO(N)\n\n- Space complexity:\nO(1)\n\n# Code\n```\nclass Solution {\npublic:\n    int diagonalSum(vector<vector<int>>& mat) {\n        int n = mat.size();\n        int sum = 0;\n        for (int i = 0; i < n; i++) {\n            sum += mat[i][i]; \n            if (i != n - i - 1) { \n                sum += mat[i][n - i - 1]; \n            }\n        }\n        return sum;\n    }\n};\n```
['C++']