Practice · 3 problems
Tries
0 of 3 solved on this device
- 095Implement Trie (Prefix Tree)Implement a trie supporting insert(word), search(word) returning whether the exact word was inserted, and startsWith(prefix) returning whether any inserted word has that prefix.Medium
- 096Design Add and Search Words Data StructureDesign a structure with addWord(word) and search(word), where the search string may contain '.' as a wildcard matching any single letter. Implement the WordDictionary class.Medium
- 097Word Search IIGiven an m x n board of characters and a list of words, return all words from the list that can be formed from sequentially adjacent cells (horizontal or vertical). A cell may not be reused within a single word.Hard