首页 > TAG信息列表 > LeetCode208
LeetCode208 实现 Trie (前缀树)
LeetCode208 实现 Trie (前缀树) 前缀树模板 class Trie: def __init__(self): self.children = [None] * 26 self.end = False def insert(self, word: str) -> None: node = self for c in word: c = ord(c) - ord('a&LeetCode208 实现 Trie (前缀树)
LeetCode208 实现 Trie (前缀树) 前缀树模板 class Trie: def __init__(self): self.children = [None] * 26 self.end = False def insert(self, word: str) -> None: node = self for c in word: c = ord(c) - ord('a&