Approach hintTry it first, then revealHide
Store the words in a trie. During search, a . branches a DFS into every existing child, while a letter follows its single matching child.
Store the words in a trie. During search, a . branches a DFS into every existing child, while a letter follows its single matching child.