Given an m x n matrix, return all elements of the matrix in spiral order.
Example 1:
1 | Input: matrix = [[1,2,3],[4,5,6],[7,8,9]] |
Example 2:
1 | Input: matrix = [[1,2,3,4],[5,6,7,8],[9,10,11,12]] |
順時針旋轉走訪矩陣。
1 | class Solution: |
如果你覺得這篇文章很棒,請你不吝點讚 (゚∀゚)