Available question text
Given a digit string, return the length of the longest contiguous substring that contains at most one adjacent equal pair (i.e., no more than one index i with s[i] == s[i+1]). This is essentially a sliding-window/two-pointer problem tracking the count of adjacent duplicate pairs.
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 2730. Find the Longest Semi-Repetitive Substring
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source