 # Confusing Problem statement and Expected Output

#1

Can someone clear the problem statement ?
In the expected output , see the following result.
Ip: bbb op: 1
ip: bcc op: 0

#2

for the given question we have find the longest repeating subsequence and i!=j,
for your input bbb it gives 1 because you can take the index value (0,1) and (1,2) so that it gives 1.
but in the second case bcc you can take only the index value (1) and (2) and problem statement says the length atleast 2. so that bcc is 0 .
you can observe this problem as a LCS and additional check is that i!=j like:-
if(A[i]==B[j] and i!=j) i mean to say .

#3

i.e., any i’th character in the two subsequences shouldn’t have the same index in the original string
focus on the above line.
for case `bbb` the repeating sub-sequence is `bb` , now you can take `bb` from 0 and 1 index and `bb` from 1 and 2 index.
bb bb
01 12
now you can see that first index is 0 and 1 which is not same also same for second index.

Now case bcc has repeating sub-sequence as `cc`

``````cc    cc
12    12
``````

here first index is 1 for both sub-sequences which is same. So it is not allowed.

#4

we donot have return length of repeating sequence ,instead if length is greater than or equal to 2,return 1,else return 0;
given in output of question…i also got stuck;