Algorithms
One can find the lengths and starting positions of the longest common substrings of and in with the help of a generalised suffix tree. Finding them by dynamic programming costs . The solutions to the generalised problem take space and ·...· time.
Read more about this topic: Longest Common Substring Problem