Problem
You are given a string s of uppercase letters and a number k. You may change at most `k` characters to any other uppercase letter. Return the length of the longest substring that can be made of one repeated letter.
Example 1
- Input
- s = "ABAB", k = 2
- Output
- 4
- Why
- change both A's or both B's
Example 2
- Input
- s = "AABABBA", k = 1
- Output
- 4
- Why
- "AABA" → "AAAA"
Example 3
- Input
- s = "ABCDE", k = 1
- Output
- 2
Constraints
1 <= s.length <= 10^5s consists of uppercase English letters only.0 <= k <= s.length