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