Given a large list of words (say 1 million). Using Trie, we could easily implement prefix match. But how can I implement partial match.
For example we have a list of words {"abc", "def", "lunch", "diner"....}, how I can get lunch when searching "unc" ?
Is Trie still a good data structure to use in this case? What are the possible ways to implement it efficiently?