Efficient substring search in a large text file containing 100 millions strings(no duplicate string)

后端 未结 4 1737
有刺的猬
有刺的猬 2021-02-10 07:50

I have a large text file(1.5 Gb) having 100 millions Strings(no duplicate String) and all the Strings are arranged line by line in the file . i want to make a wepapplication in

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-10 08:12

    Since you have more RAM than the size of the file, you might be able to store the entire data as a structure in the RAM and search it very quickly. A trie might be a good data structure to use; it does have fast prefix finding, but not sure how it performs for substrings.

提交回复
热议问题