498. Diagonal Traverse
Problem Statement
Input: mat = [[1,2,3],[4,5,6],[7,8,9]]
Output: [1,2,4,7,5,3,6,8,9]Input: mat = [[1,2],[3,4]]
Output: [1,2,3,4]Intuition
Links
Video Links
Approach 1:
Approach 2:
Approach 3:
Approach 4:
Similar Problems
Last updated
