Need Hints for Yalalovichik Strings (Problem Code: YVSTR)?

Can Some One Shower Some hints for the following question?
Question: CodeChef: Practical coding for everyone

Only substrings of form aaa or aabbb needs to be considered

2 Likes

Nope ,“aabaa” has a subsequence “aaaa” but not a substring …

Yeah, you’re right. I completely overlooked that.