Simple solution. Easy to understand (beats 95%)
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: $$O(n^2)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(1)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n![image.png](https://assets.leetcode.com/users/images/0e4151c9-0ee2-4612-9cc1-94fbc3ac7909_1675174348.1628556.png)\n\n\n# Code\n```\npublic class Solution {\n    public int DiagonalSum(int[][] mat)\n        {\n            int sum = 0;\n            for (int i = 0; i < mat.Length; i++)\n            {\n                for (int j = 0; j < mat.Length; j++)\n                {\n                    if (i == j)\n                    {\n                        sum += mat[i][j];\n                        continue;\n                    }\n                    if (i + j == mat.Length - 1)\n                    {\n                        sum += mat[i][j];\n                    }\n                }\n            }\n            return sum;\n        }\n}\n```
['C#']