Available question text
Find the maximum length L of a "special" substring (a contiguous run of a single repeated character) that appears at least three times in s (occurrences may overlap), or return -1 if none. With |s| up to 5e5, the solution should be near-linear or n log n in complexity.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2982. Find Longest Special Substring That Occurs Thrice II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source