We have a string of length n, which consist only UPPER and LOWER CASE characters and we have a number k (always less than n and greater than 0). We can make at most k changes in our string such that we can get a sub-string of maximum length which have all same characters.
The first line of the input contains an integer T which denotes the number of test cases to follow. Each test case contains space separated 2 integers n and k. Next line has a string of length n.
Print an integer which denotes the maximum length possible.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.