Alternative Subsequence: The Extension

Recall that the sequence b is a subsequence of the sequence a, if b can be derived from a by removing zero or more elements without changing the order of the remaining elements. For example, if a = [1, 2, 1, 3, 1, 2, 1], then possible subsequences of a are: [1, 1, 1, 1], [3] and [1, 2, 1, 3, 1, 2, 1], but not [3, 2, 3] and [1, 1, 1, 1, 2].


This is a companion discussion topic for the original entry at https://toph.co/p/alternative-subsequence-the-extension