easy solution (c++)
Intuition\n\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- Tim
# Intuition\n![upvote 1.jpeg](https://assets.leetcode.com/users/images/e8413b86-e6e2-4d1c-b304-a7065b692984_1678369492.7062213.jpeg)\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 size = mat.size ();\n        int sum = 0 ;\n        for ( int i = 0 ; i < size ; i ++ ){\n            for ( int j = 0 ; j < size ; j ++ ){\n                if ( (i == j) || ( (i + j ) == (size-1)) ){\n                    sum += mat[i][j];\n                }\n            }\n        }\n       return sum; \n    }\n};\n```
['C++']