Back to Question

Word Dictionary with Wildcards (Trie)

Question Explain

Design a data structure that supports adding words and searching for words that might contain the '.' wildcard character. Use a Trie, but modify the search operation to handle the wildcard (DFS).

Start Trying This Question Simulation

Click "Start Speaking" and answer the question naturally.