Loose Test Cases in the problem


#1

Test case aabcd should give ans 1 but 0 is accepted.


#2

It should give 0. you cannot make a two subsequence here with the conditions mentioned in the question;