Only one test case is passed …all test case are not passed.
All test case are not passed
@mayurjhode55, your logic is not correct , let’s take an example
say k= 3
and string is " abbabbaa "
according to your code the answer should be number of a + k = 4 + 3 =7
but the correct answer is 6 as the maximum substring you can have with all same character is babbaa (starting from index 2) it has size of 6
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.
Pls share your code so that I could check the error in your code…and refer to the changes as well.