http://www.perlmonks.org?node_id=608380


in reply to Re^3: Challenge: Fast Common Substrings (O(n)?)
in thread Challenge: Fast Common Substrings

The naive algorithm requires O(N*N). The Ukkonen algorithm needs only O(N). If you want to understand it - it is not trivial - I recommend Gusfields book (Algorithms on Strings,...).
  • Comment on Re^4: Challenge: Fast Common Substrings (O(n)?)