Longest Duplicate Substring
Hard📝 Description
Find the longest substring that occurs at least twice in a string
Input Format
String s
Output Format
Longest duplicate substring
Constraints
2 ≤ s.length ≤ 3 * 10^4
🔍 Sample Input
"banana"
✅ Sample Output
"ana"
Code Editor
Please login to run and submit code.
Results
Suggested Solution
Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run