Leetcode 1572. Matrix Diagonal Sum
Compute the sum of the primary and secondary diagonals of an n×n matrix, making sure to count the center element only once when n is odd.
Asked at:
Amazon
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Mid July, 2026
Junior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.