Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Amazon
Leetcode 1572. Matrix Diagonal Sum
Reported Jul 12, 2026 · 1 source report
JUNIOR
Source snapshot: Nov 12, 2026
View source