You are given a string s and an integer k. You can choose any character and change it to any other uppercase English character, at most k times. Return the length of the longest substring containing the same letter after performing the above operations.
Input: s = "ABAB", k = 2
Output: 4
Topics: strings, sliding-window
Asked by: Amazon, Google, Meta, Microsoft
Time complexity: O(n). Space complexity: O(1).