String: Suffix array + longest repeated substring