[LeetCode] 54. Spiral Matrix 简洁的AC解答(C++实现)
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.
Example 1:
Input:
[
[ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ]
]
Output: [1,2,3,6,9,8,7,4,5]
...
原创
2018-09-06 17:45:26 ·
186 阅读 ·
0 评论