일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 715. Range Module
- attribute
- Class
- 315. Count of Smaller Numbers After Self
- Substring with Concatenation of All Words
- concurrency
- Python Implementation
- 43. Multiply Strings
- kaggle
- DWG
- 컴퓨터의 구조
- 밴픽
- 시바견
- 운영체제
- 30. Substring with Concatenation of All Words
- LeetCode
- Regular Expression
- 파이썬
- data science
- Generator
- 프로그래머스
- t1
- Python Code
- shiba
- Decorator
- Protocol
- 109. Convert Sorted List to Binary Search Tree
- iterator
- Python
- Convert Sorted List to Binary Search Tree
Archives
- Today
- Total
목록208. Implement Trie (Prefix Tree) (1)
Scribbling
LeetCode: 208. Implement Trie (Prefix Tree)
class TrieNode: def __init__(self): self.children = {} self.endFlag = False class Trie: def __init__(self): self.root = TrieNode() def insert(self, word: str) -> None: node = self.root for char in word: if char not in node.children: node.children[char] = TrieNode() node = node.children[char] node.endFlag = True def search(self, word: str) -> bool: node = self.root for char in word: if char not i..
Computer Science/Coding Test
2021. 12. 9. 17:10