Implement a function to return the sum of diagonal elements in a square matrix.
MediumProblem Statement
Implement a function to return the sum of diagonal elements in a square matrix.
Sample Input
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]
Sample Output
15
Limits
Time: 2s · Memory: 256 MB