Can any body explain me the question sanket and string

i am not able to get what question is trying to say .plz help me with some more examples

Hi Anushi,in this question you have to input a string and a integer K which tells that upto how much characters you can make changes in the string so what you have to do is make the substrings of the given string which is of the same length such that in each substring K changes can be done,for example in abba you can get 4 substrings like baba,bbaa,aabb and abab so the output is 4 and see in each substring we have made 2 changes as K=2.

1 Like