You are given a string s and an integer k. You can choose any character in the string and change it to any other uppercase English letter. You may perform this operation at most k times.
Return the length of the longest substring that can be made to contain all the same character after at most k replacements.
Input: s = "ABAB", k = 2 Output: 4 Explanation: Replace both 'A's with 'B' (or both 'B's with 'A') to get "BBBB" or "AAAA", length 4.
Input: s = "AABABBA", k = 1 Output: 4 Explanation: Replace the one 'B' in "AABA" to get "AAAA", which has length 4.
1 <= s.length <= 10^5s consists of only uppercase English letters.0 <= k <= s.lengths = "ABAB", k = 2