Available question text
Given a string, perform k single-character updates and after each update return the length of the longest substring made of a single repeated character; with n,k up to 1e5 this requires an efficient dynamic structure (e.g., a segment tree that merges prefix/suffix run lengths and max run) to update and query in O(log n) time.
Related questions
Continue with questions that share topics or the same question type.
- Longest Balanced Substring With One Swap
Coding
- Longest Repeating Character Replacement
Coding · Hash Table · Sliding Window · String
- Longest Repeating Substring
Coding
- Longest Substring with At Least K Repeating Characters
Coding
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
Digitalocean
Leetcode 2213. Longest Substring of One Repeating Character
Reported Aug 23, 2026 · 1 source report
SENIOR
Source snapshot: Nov 12, 2026
View source