Longest Repeating Character Replacement - Read Statement

Given a string s and integer kk, you can replace at most kk characters to make any substring contain only one repeating character. Return the length of the longest such substring.

Example: For "AABABBA" and k=1k=1, return 44. Replace one A in "ABAB" to get "AAAA" or "BBBB".