Wikipedia / Longest repeated substring problem
Wikipedia / Longest repeated substring problem
In computer science, the longest repeated substring problem is the problem of finding the longest substring of a string that occurs at least twice.
by building a suffix tree leaf descendants. To avoid overlapping repeats, you can check that the list of suffix lengths has no consecutive elements with less than prefix-length difference.
In the figure with the string "ATCGATCGA$", the longest substring that repeats at least twice is "ATCGA".
External links