Available question text
Return the elements of an m×n matrix in diagonal (zigzag) order, alternating between up-right and down-left along each diagonal. The core insight is to group cells by their i+j diagonal index and reverse every other group to produce the alternating traversal while handling boundary lengths.
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 · 2 records
Amazon
Leetcode 498. Diagonal Traverse
Reported Jun 25, 2026 · 1 source report
JUNIOR
Source snapshot: Nov 12, 2026
View sourceMeta
Leetcode 498. Diagonal Traverse
Reported Nov 3, 2025 · 8 source reports
MID_LEVEL, SENIOR, STAFF
Source snapshot: Nov 12, 2026
View source