What is the most efficient algorithm when the problem gives you a string of N length and asks you to answer in Q queries if the ith word of length M (where M is much lesser than N -> M << N) is contained into 'N length word' ?
Thanks in advance !
# | User | Rating |
---|---|---|
1 | tourist | 3778 |
2 | Benq | 3592 |
3 | ecnerwala | 3521 |
4 | Um_nik | 3423 |
5 | jiangly | 3375 |
6 | Petr | 3342 |
7 | Radewoosh | 3337 |
8 | scott_wu | 3313 |
9 | maroonrk | 3265 |
10 | yosupo | 3259 |
# | User | Contrib. |
---|---|---|
1 | 1-gon | 203 |
2 | Errichto | 202 |
3 | rng_58 | 194 |
3 | SecondThread | 194 |
5 | awoo | 187 |
6 | vovuh | 183 |
7 | Um_nik | 182 |
8 | antontrygubO_o | 177 |
9 | Ashishgup | 175 |
10 | -is-this-fft- | 171 |
Multiple Queries/String Matching
What is the most efficient algorithm when the problem gives you a string of N length and asks you to answer in Q queries if the ith word of length M (where M is much lesser than N -> M << N) is contained into 'N length word' ?
Thanks in advance !
Rev. | Lang. | By | When | Δ | Comment | |
---|---|---|---|---|---|---|
en1 |
![]() |
Hepic_Antony_Skarlatos | 2016-07-04 17:40:25 | 281 | Initial revision (published) |
Name |
---|