剑指 Offer 29. 顺时针打印矩阵 TODO
看的题解, 叹为观止
class Solution:
def spiralOrder(self, matrix: List[List[int]]) -> List[int]:
ret = []
while matrix:
ret += matrix.pop(0)
matrix = list(zip(*matrix))[::-1]
return ret