Longest Repeating Character Replacement

easy
1. You will be given a String and an integer k 2. Given that you can replace exactly k characters with any character, you need to find length of the longest sequence with repeating character 3. Input and output is handled for you 4. It is a functional problem ,please do not modify main()

Input Format

Input is handled for you.

Output Format

Output is handled for you

Constraints

1<K=N<=10000
 All characters will be in uppercase

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
AAABAAACCAABA
1
Output
7
Previous
Integer To English Words
Next
Long Pressed Name

Related Questions