You are given a string s of uppercase English letters and an integer k. You may replace at most k characters with any other letter. Return the length of the longest substring containing a single repeated letter achievable this way.
Input
skOutput: the maximum length.
ABAB 2
4
Replace both A's (or both B's) → AAAA.
AABABBA 1
4
Replace the middle A → AABBBBA, window BBBB.
Run your code against the sample tests, or Submit to run the full suite.