54. Spiral Matrix
2019-05-02
54. Spiral Matrix
Given a matrix of _m_ x _n_ elements (_m_ rows, _n_ columns), return all elements of the matrix in spiral order.
Example 1:
1 | Input: |
Example 2:
1 | Input: |
Code:
1 | class Solution(object): |
1 | def spiralOrder(self, matrix): |