We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f73c2ce commit da62e13Copy full SHA for da62e13
set-matrix-zeroes/yyyyyyyyyKim.py
@@ -4,6 +4,7 @@ def setZeroes(self, matrix: List[List[int]]) -> None:
4
Do not return anything, modify matrix in-place instead.
5
"""
6
# 0이 있는 행, 열을 기록해두고 그 기록을 토대로 바꾸기(시간복잡도 O(m*n), 공간복잡도 O(m+n))
7
+ # Follow up : 공간복잡도 O(1) 생각해볼것
8
m, n = len(matrix), len(matrix[0])
9
# rows, cols = [] , [] -> 중복되어 들어갈 수 있음. 불필요함. 중복제거를 위해 set 사용.
10
rows, cols = set(), set()
0 commit comments