Efficient string matching algorithm

后端 未结 14 832
Happy的楠姐
Happy的楠姐 2020-12-16 07:13

I\'m trying to build an efficient string matching algorithm. This will execute in a high-volume environment, so performance is critical.

Here are my requirements:

14条回答
  •  离开以前
    2020-12-16 07:48

    Not sure what your ideas were for splitting and iterating, but it seems like it wouldn't be slow:

    Split the domains up and reverse, like you said. Storage could essentially be a tree. Use a hashtable to store the TLDs. The key would be, for example, "com", and the values would be a hashtable of subdomains under that TLD, iterated ad nauseum.

提交回复
热议问题