일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- 315. Count of Smaller Numbers After Self
- 파이썬
- kaggle
- 운영체제
- Generator
- concurrency
- Python
- 시바견
- 715. Range Module
- t1
- 109. Convert Sorted List to Binary Search Tree
- Python Code
- data science
- 프로그래머스
- 43. Multiply Strings
- DWG
- shiba
- Class
- iterator
- 30. Substring with Concatenation of All Words
- Substring with Concatenation of All Words
- Regular Expression
- Python Implementation
- 컴퓨터의 구조
- Convert Sorted List to Binary Search Tree
- LeetCode
- attribute
- 밴픽
- Decorator
- Protocol
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