Subsequence Equality Problem Code: LIKECS01 in interpreter its showing correct output . but here its showing wrong output

def sub_seq(string):
for i in range(length):

    for k in range(i+1,length):
         if string[i]==string[k]:

             for each in range(i+1,k):
                 for j in range(k+1,length):
                    if string[each]==string[j]: return 1
return 0

for each in range(int(input())):
if sub_seq(string)==1: print(‘yes’)
else: print(‘no’)

I have provided a detailed editorial for this which you may refer here, or the official editorial

You need not mess around substrings this much… just an insight… :slight_smile: