Algorithm (1) 썸네일형 리스트형 Trie Trie is an efficient information retrieval data structure. Every node of Trie consists of multiple branches. Each branch presents a possible character of keys. We need to mark the last node of every key as end of word node. class TrieNode: def __init__(self): self.children = [None]*26 self.isEndOfWord = False class Trie: def __init__(self): self.root = TrieNode() def _charToIndex(self, ch): retu.. 이전 1 다음