C++ solution using 4 symmetries
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:\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```\nclass Solution {\npublic:\n    int diagonalSum(vector<vector<int>>& mat) {\n        int n=mat.size();\n        int sum=0;\n        int n_2=n/2;\n        for (int i=0; i<n/2; i++){\n            sum+=(mat[i][i]+mat[i][n-1-i]+mat[n-1-i][n-1-i]+mat[n-1-i][i]);\n        }\n        if((n&1)==1) sum+=mat[n_2][n_2];\n        return sum;\n    }\n};\n```
['Array', 'C++']