SEPTEMBER COOK-OFF SubSequence Equality problem.

Can please anybody explain me where I went wrong in subsequence equality problem of sept cook off challenge.

My solution link is-


Your code fails for test case


What if any character has three occurrences

You need to change the condition in second loop from

if (count [i] %2 ==0 && count [i] != 0)


if (count [i] >1)

You can read thr idea behind this here

Upvote if you find this helpful :slight_smile:

1 Like

oh…I got it.Thankx a lot.

Feel free to ask anything…