Easy Simple Solution O(n) Time complexity:
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 {\n    public int diagonalSum(int[][] mat) {\n        int len = mat.length;\n        int sum =0;\n        for(int i = 0;i<len;i++){\n            int ele1 = mat[i][i];\n            int ele2 = mat[i][len-i-1];\n            sum+=ele1+ele2;\n        }\n        if(len%2==0) return sum;\n        else return sum - mat[len/2][len/2];\n    }\n}\n```
['Java']