Longest non-repeating subsequence
Conditions d'achèvement
Ouvert le : jeudi 7 mai 2020, 00:00
À remettre : jeudi 14 mai 2020, 00:00
Design an effective algorithm that for a given sequence of integers x1, x2, .... , xn finds a longest continuous subsequence with no repeated entries.
That is values a,b maximizing b-a, satisfying
1) 1⩽a<b⩽n
2) xc ≠ xd for every a⩽c<d⩽b.