阅读背景:

具有快速前缀搜索的只读字符串列表(约100,000)的最有效数据结构

来源:互联网 

I'm writing an application that needs to read a list of strings from a file, save them in a data structure, and then look up those strings by prefixes. The list of strings is simply a list of words in a given language. For example, if the search function gets "stup" as a parameter, it should return ["stupid", "stupidity", "stupor"...]. It should do so in O(log(n)*m) time, where n is the size of the data structure and m is the number of results and should be as fast as possible. Memory consumption is not a big issue right now. I'm writing this in python, so it would be great if you could point me to a suitable data structure (preferably) implemented in c with python wrappers. I'm writing an application that needs to read a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: