LongLong
Practice
4.1 (62 votes)
Approved
Binary search
Hash maps
Medium
Open
String manipulation
Problem
81% Success 5628 Attempts 30 Points 2s Time Limit 256MB Memory 1024 KB Max Code

You are given a string S. Find the length of its the longest substring which occurs at least two times. Occurences can intersect.

Input
One line containing a string S consisting of lowercase Latin letters.

Output
Output one integer - answer to the question.

Constraints
1 <= length of S <= 1000000

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:30
48 votes
Tags:
Ad-HocAlgorithmsApprovedHash MapsMediumOpen
Points:30
19 votes
Tags:
Data StructuresHash MapsHash TablesMedium
Points:30
15 votes
Tags:
ArraysHash MapsHash TablesHiringMedium