Given a string s, return the longest substring of s that appears at least twice within s. The repeated occurrences may overlap. If there is no duplicated substring, return an empty string.
Note: If multiple answers have the same maximum length, returning any one of them is acceptable.
Constraints:
s.length
s consists of lowercase English letters.
Given a string s, return the longest substring of s that appears at least twice within s. The repeated occurrences may overlap. If there is no duplicated substring, return an empty string.
Note: If multiple answers have the same maximum length, returning any one of them is acceptable.
Constraints:
s.length
s consists of lowercase English letters.