实现一个索引的文本文件内容文本文件、索引、内容

2023-09-11 07:16:54 作者:我不发光谁发

我有一个庞大的数目字(〜50MB)的文本文件。对于建立一个索引文件的内容,该数据结构是最适合?

I have a text file with a huge number of words( ~50MB ). For building an index for this file content , which data structure is best suited ?

或者用什么数据结构,我能达到最好的效果,同时寻找?

Or using what data structure , I can achieve best results while searching ?

在此先感谢

Jijoy

推荐答案

如果你的数据是字的字典中的特里是非常适合。

If your data is a dictionary of words a Trie is well-suited.