Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 498. Diagonal Traverse
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.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid October, 2025
Meta
Mid-level
Early October, 2025
Meta
Mid-level
Early October, 2025
Meta
Mid-level
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.