kmp and longest repeated substring