Three letters doubt lunchtime 91

Can someone tell me what is the mistake in this solution ? Its giving WA for only 1 test file.


Your code gives 1, answer should be 2.

bab and ccc.

can u plz tell me the test cases for which my code is failing?

I think your code gives 4 on this - bacaacacbc

1 Like

your code gives 2 but the answer is 1

1 Like

thanks…now it got accepted

1 Like

I’m afraid I can’t tell where my solution is going wrong either, could someone point me in the right direction here?SOLUTION??

Well, I am sure my algorithm is correct but for some reason, I am getting runtime error on 2 test cases. Can someone help me?