Coding · Medium · Pro
Trie search with '.' wildcard matching any letter
CodingTrieSenior
Approach
- DFS on trie nodes; on '.', try all children.
- On letter, follow single child.
- At end of word require
isEnd.
Java Solution
Java
public class WildcardTrie {
public boolean search(TrieNode node, String word, int i)…