java - which datastructure Or algorithm to use to arrange data of dictionary for sequence search? -
i have dictionary near around million words. have design algorithm quick search of sequence of characters.
for ex. if user types and
app must return words having sequence random
,sand
,stand
...etc.
the existing solution have search matching regex in existing words not efficient. open restructure existing database, caching of dictionary or work @ level if required or there ready made api in java?
i'd try using trie (where find standard trie based map implementation in java?). using in memory lucene index may fit bill, depending on requirements
Comments
Post a Comment