일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- DWG
- t1
- 파이썬
- data science
- 시바견
- kaggle
- 30. Substring with Concatenation of All Words
- Python Implementation
- Class
- LeetCode
- Convert Sorted List to Binary Search Tree
- 315. Count of Smaller Numbers After Self
- Regular Expression
- attribute
- 715. Range Module
- Protocol
- shiba
- Python Code
- Python
- 프로그래머스
- 밴픽
- 43. Multiply Strings
- concurrency
- iterator
- 컴퓨터의 구조
- Decorator
- 운영체제
- Generator
- Substring with Concatenation of All Words
- 109. Convert Sorted List to Binary Search Tree
Archives
- Today
- Total
목록212. Word Search II (1)
Scribbling
LeetCode: 212. Word Search II
단순 구현 문제로 생각했는데, 시간 초과가 발생한다. 메모리를 더 써서 시간을 줄여야 한다. class Solution: def findWords(self, board: List[List[str]], words: List[str]) -> List[str]: m, n = len(board), len(board[0]) ret = [] for word in words: found_flag = False for i in range(m): for j in range(n): if board[i][j] == word[0]: visited = [[False] * n for _ in range(m)] visited[i][j] = True if self.dfs(board, visited, i, j, word[1:]): r..
Computer Science/Coding Test
2021. 12. 8. 20:48