daught- how to approach …
what the question is saying …
can any one explain samle test case…what is happening
any video tutorial on this???
ques-
Sanket has a string consisting of only a and b as the characters. Sanket describes perfectness of a string as the maximum length substring of equal characters. Sanket is given a number K which denotes the maximum number of characters he can change. Find the maximum perfectness he can generate by changing no more than k characters
nput Format:
The first line contains an integer denoting the value of K. The next line contains a string having on ‘a’ and ‘b’ as the characters
Constraints:
2 ≤ N ≤ 10^5
Output Format
Single integer denoting the maximum perfectness achievable
Sample Input
2
abba
Sample Output
4