|
|
|
|
|
by tomdeakin
5215 days ago
|
|
This kind of discussion is lacking in the article. It seems as if the OPs goal is optimisation and of course finding the right algorithm with the lowest complexity is the first port of call. However, the indexOf function seems to rely on properties of the data which may not be present (like the forced example in the middle). There are other algorithms besides KMP too for this. I'm sure with some thinking on my part the linear time suffix tree algorithms could solve this too off hand. |
|