CANT UNDERSTAND THE QUESTION

NOT ABLE TO UNDERSATND THE QUESTION. IF UH COULD JUST EXPLAIN THE QUESTION WITH MORE EXAMPLES. I DONT NEED THE SOLUTION

hello @dhruv.mahajan.mait
You are given a string and you can change atmost any k characters from either ‘a’ to ‘b’, or ‘b’ to ‘a’ as you wish ( since the string consists of only these two characters). Now what is the maximum possible length of substring of same characters obtainable after these operations. E.g. you have ‘abba’, and k = 2, you change the middle 2 b’s to a’s and thus obtain aaaa which has a substring of length 4 of equal characters

WHAT IF INPUT IS baaaaaabbab

u can change the 2 two consecutive b to a .
and then the sequence of a will give u maximum

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.