I have this method
arr // input
new_ seq = []
for i in arr:
new_seq.append(i)
__new_seq = [x for i, x in enumerate(arr) if x not in new_seq]
for j in __new_seq:
new_seq.append(j)
__new_seq = [x for i, x in enumerate(arr) if x not in new_seq]
for k in __new_seq:
new_seq.append(k)
How to calculate the time complexity for this method Please note that each loop has a smaller length than the one before