Skip to content

Commit 644f7bc

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 229500f commit 644f7bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

matrix/spiral_print.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ def spiral_traversal(matrix: list[list]) -> list[int]:
116116
[1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7] + spiral_traversal([])
117117
"""
118118
if matrix:
119-
return list(matrix.pop(0)) + spiral_traversal([list(row) for row in zip(*matrix)][::-1])
119+
return list(matrix.pop(0)) + spiral_traversal(
120+
[list(row) for row in zip(*matrix)][::-1]
121+
)
120122
else:
121123
return []
122124

0 commit comments

Comments
 (0)