diff --git a/problems/0054.螺旋矩阵.md b/problems/0054.螺旋矩阵.md index 59771a67..44a7749d 100644 --- a/problems/0054.螺旋矩阵.md +++ b/problems/0054.螺旋矩阵.md @@ -260,7 +260,7 @@ class Solution(object): :type matrix: List[List[int]] :rtype: List[int] """ - if len(matrix)==0 or len(matrix[0])==0 : # 判定List是否为空 + if len(matrix) == 0 or len(matrix[0]) == 0 : # 判定List是否为空 return [] row, col = len(matrix), len(matrix[0]) # 行数,列数 loop = min(row, col) // 2 # 循环轮数 @@ -268,7 +268,7 @@ class Solution(object): i, j =0, 0 count = 0 # 计数 offset = 1 # 每轮减少的格子数 - result = [0]*(row*col) + result = [0] * (row * col) while loop>0 :# 左闭右开 i, j = stx, sty while j < col - offset : # 从左到右