Update distinct_subsequence