Suffix Tree - Application 2 - Longest Repeated Substrings
hard
Given a string print all the start indexes of longest repeated substrings. Refer to video for more info
Constraints
|S| <= 10^5
Format
Input
A string s
Output
Print the length of Longest repeated substring and in next line print all the start indexes
Example
Sample Input
pepapep
Sample Output
3
0 4