Skip to main content
Longest Repeating Character Replacement | AlgoCracked
AlgoCracked
ProblemsLongest Repeating Character Replacement
Medium53.0% acceptance
Blind75StringSliding WindowHash Table

Longest Repeating Character Replacement

Given a string s of uppercase letters and an integer k , you may replace at most k characters with any uppercase letters. Return the length of the longest substring that can be made of a single repeated character after those replacements. Input format Input is [s, k] , e.g. [ AABABBA ,1] .

Loading workspace…