Words Within Two Edits of Dictionary
Medium · Trie · about 15 minutes
Asked at Google, Amazon, Microsoft.
All words in queries and dictionary have the same length. An edit changes one letter. Return, in their original order, the queries that can match some dictionary word with at most two edits.