588. Design In-Memory File System 588. Design In-Memory File System class TrieNode: def __init__(self)
648. Replace Words 648. Replace Words 這一題就屬於一開始看題目比較不容易看出來要是用 Trie ,題目中的一個小提示是最後我們要輸出的字串,是要輸出的是每個單字的 prefix ,看到要找 prefix
1268. Search Suggestions System 1268. Search Suggestions System class TrieNode: def __init__(self): self.
642. Design Search Autocomplete System 642. Design Search Autocomplete System class AutocompleteSystem: def __init__(self,
211. Design Add and Search Words Data Structure 211. Design Add and Search Words Data Structure 這一題比較特別,需要模糊比對搜尋的字串,