I have a large set (100k) of short strings (not more than 100 chars) and I need to quickly find all those who have a certain substring.
This will be used as a search box where the user starts typing and the system immediately gives "suggestions" (the strings that have as a substring the text that the user typed). Something similar to the "Tag" box in StackOverflow.
As this will be interactive, it should be pretty fast. What algorithm or data structure do you recommend for this?
BTW, I'll be using Delphi 2007.
Thanks in advance.