In this problem I am unable to understand the problem …so please tell me about problem with an example and with it’s explanation
About Sanket and strings
In this question you are given an integer k and a string of ‘a’ and ‘b’. What you need to do is that you have to replace either ‘a’ by ‘b’ or ‘b’ by ‘a’ at most k times
so that you get a sub string of maximum length of either continuous ‘a’ or continuous ‘b’.
For example
k = 2
string = “aabababaabb”
If we replace b at index 2 and index 4, we get sub string of all a of length 6 and 6 is the perfectness of the above string.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
sir i check at last of the code