The most efficient way to search for an array of strings in another string

后端 未结 8 2310
礼貌的吻别
礼貌的吻别 2021-02-12 15:12

I have a large arrray of strings that looks something like this: String temp[] = new String[200000].

I have another String, let\'s call it bigtext. What I ne

8条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-12 15:53

    I think you're looking for an algorithm like Rabin-Karp or Aho–Corasick which are designed to search in parallel for a large number of sub-strings in a text.

提交回复
热议问题