728x90
오늘 딥러닝 시험 대차게 말아먹고 와서 코딩 테스트 문제 풀었는데 😇
내 마음을 아는 건지
엄청 쉬운 문제였다.
근데 뭘 물어보고 싶은건지 모르겠다. 뭐지 그냥 배열인데
class SubrectangleQueries:
def __init__(self, rectangle):
self.rectangle = rectangle
def updateSubrectangle(self, row1: int, col1: int, row2: int, col2: int, newValue: int) -> None:
for x in range(row1, row2 + 1):
for y in range(col1, col2 + 1):
self.rectangle[x][y] = newValue
def getValue(self, row: int, col: int) -> int:
return self.rectangle[row][col]
열심히 살아야지...ㅎ
728x90
'코딩테스트' 카테고리의 다른 글
LeetCode - 1282. Group the People Given the Group Size They Belong To (1) | 2024.06.16 |
---|---|
LeetCode - 2433. Find The Original Array of Prefix Xor (0) | 2024.06.15 |
LeetCode - 1641. Count Sorted Vowel Strings (1) | 2024.06.07 |
프로그래머스 구명보트 (1) | 2024.06.05 |
LeetCode - 2415. Reverse Odd Levels of Binary Tree (2) | 2024.06.03 |