Keep It Simple, Stupid | |
PerlMonks |
Re^2: Words in Wordsby LanX (Saint) |
on Oct 01, 2011 at 09:44 UTC ( [id://929021]=note: print w/replies, xml ) | Need Help?? |
yes searching in Suffix_tree is O(1), but constructing those trees implies a overhead. Since in our case all searched strings are also known in advance, I'm not sure that this is really the fastest approach. At least the construction process will already identify embedded strings, since they are leaves of the suffix tree.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|