Ezvor

1062. Longest Repeating Substring

MediumString Preparing judge… LeetCode
StringBinary SearchDynamic ProgrammingRolling HashSuffix ArrayHash FunctionSuffix AutomatonSuffix Tree

Hints

Hint 1
Generate all substrings in O(N^2) time with hashing.
Hint 2
Choose those hashing of strings with the largest length.