Straightforward
We just need to look at the index of the diagonals. Primary diagonal in a n sqaure matrix looks like: mat[0][0], mat[1][1], ..., mat[n][n]\nSecondary diagonal l
We just need to look at the index of the diagonals. Primary diagonal in a n sqaure matrix looks like: mat[0][0], mat[1][1], ..., mat[n][n]\nSecondary diagonal looks like: mat[0][n], mat[1][n-1], mat[2][n-1], ..., mat[n][0]\nWe also need to avoid the cells which we included in primary diagonal calculations, in secondary diagonal calculations. \n\n```\n\nclass Solution:\n    def diagonalSum(self, mat: List[List[int]]) -> int:\n        rows = len(mat)\n        primaryDiagonalSum = 0\n        for i in range(rows):\n            primaryDiagonalSum += mat[i][i]\n        \n        secondaryDiagonalSum = 0\n        for i in range(rows):\n            if i == rows - 1 - i: #Avoiding cells already incliuded in primary diaognal\n                continue\n            secondaryDiagonalSum += mat[i][rows - 1 - i]\n            \n        return primaryDiagonalSum + secondaryDiagonalSum\n```
[]