Leetcode 2213. Longest Substring of One Repeating Character
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.
Asked at:
DigitalOcean
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late August, 2026
DigitalOcean
Senior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.