1062. Longest Repeating Substring
Description
**Input:** s = "abcd"
**Output:** 0
**Explanation:** There is no repeating substring.**Input:** s = "abbaba"
**Output:** 2
**Explanation:** The longest repeating substrings are "ab" and "ba", each of which occurs twice.**Input:** s = "aabcaabdaab"
**Output:** 3
**Explanation:** The longest repeating substring is "aab", which occurs 3 times.**Input:** s = "aaaaa"
**Output:** 4
**Explanation:** The longest repeating substring is "aaaa", which occurs twice.ac
Last updated