Doubt regarding test case


#1

Why does abba give 0 if aabb gives 1?


#2

abba has longest repeating subsequence of length 1 (either “a” or “b”) but question says that " NOTE: Sub-sequence length should be greater than or equal to 2." that why for abba, ans is 0 .

now for aabb, longest repeating subsequence of length 2(“ab”), and we have to just return true/false, (1/0 in int), if Sub-sequence length>=2 exists.Thats why 1.


#3

I don’t understand why aabb has a repeating subsequence ab. Isn’t a subsequence supposed to be a sequence of consecutive characters from the original string?