일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 43. Multiply Strings
- shiba
- Protocol
- 운영체제
- DWG
- 파이썬
- Decorator
- data science
- iterator
- 컴퓨터의 구조
- Regular Expression
- Convert Sorted List to Binary Search Tree
- Python Code
- 시바견
- Python
- attribute
- 프로그래머스
- 30. Substring with Concatenation of All Words
- 밴픽
- concurrency
- t1
- LeetCode
- Class
- 715. Range Module
- 315. Count of Smaller Numbers After Self
- kaggle
- 109. Convert Sorted List to Binary Search Tree
- Generator
- Python Implementation
- Substring with Concatenation of All Words
Archives
- Today
- Total
목록Surrounded Regions (1)
Scribbling
LeetCode: 130. Surrounded Regions
고립된 O를 X로 만드는 문제이다. "고립된"은 board의 경계와 이어지지 않는 O들이다. 고로 경계의 O와 이어진 O들을 제외하고, 모두 X 처리해준다. from collections import deque class Solution: def solve(self, board: List[List[str]]) -> None: """ Do not return anything, modify board in-place instead. """ dy = [0, 1, 0, -1] dx = [1, 0, -1, 0] island = set() m, n = len(board), len(board[0]) for i in range(m): for j in range(n): if board[i][j] == "O": islan..
Computer Science/Coding Test
2021. 11. 10. 21:45