Magic Dictionary
hardImplement buildDict + search allowing one character mismatch
Magic Dictionary
Key Insight
While scanning searchWord, allow exactly one changed character in the trie path.
Step 1Build Dictionary
Array
HashMap
hello:1
hallo:1
leetcode:1
Store hello, hallo, leetcode as words.
1 / 3