Search
⌘K

Leetcode 1062. Longest Repeating Substring

Given a string, return the length of the longest substring that appears at least twice in the string (overlaps allowed). This requires efficiently detecting repeated substrings — typical approaches use suffix arrays/automata or binary search with rolling hash to test candidate lengths.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.