# ---
# title: 498. Diagonal Traverse
# id: problem498
# author: Tian Jun
# date: 2020-10-31
# difficulty: Medium
# categories: 
# link: <https://leetcode.com/problems/diagonal-traverse/description/>
# hidden: true
# ---
# 
# Given a matrix of M x N elements (M rows, N columns), return all elements of
# the matrix in diagonal order as shown in the below image.
# 
# 
# 
# **Example:**
# 
#     
#     
#     Input:
#     [
#      [ 1, 2, 3 ],
#      [ 4, 5, 6 ],
#      [ 7, 8, 9 ]
#     ]
#     
#     Output:  [1,2,4,7,5,3,6,8,9]
#     
#     Explanation:
#     ![](https://assets.leetcode.com/uploads/2018/10/12/diagonal_traverse.png)
#     
# 
# 
# 
# **Note:**
# 
# The total number of elements of the given matrix will not exceed 10,000.
# 
# 
## @lc code=start
using LeetCode

## add your code here:
## @lc code=end
