public class LongestRepeatedSubstring extends Object
LongestRepeatedSubstringclass provides a
SuffixArrayclient for computing the longest repeated substring of a string that appears at least twice. The repeated substrings may overlap (but must be distinct).
For additional documentation, see Section 6.3 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
|Modifier and Type||Method and Description|
Returns the longest repeated substring of the specified string.
Unit tests the
text- the string
text; the empty string if no such string
public static void main(String args)
args- the command-line arguments