Algorithm to determine all possible ways a group of values can be removed from a sequence
(Because it was unclear in the original version of the question whether you meant to remove a subsequence or an unordered list, I’ve updated my answer to address both cases.) 1. Removing a sub-sequence in order We get a sequence of values, e.g. [1,5,1,3,4,2,3,2,1,3,1,2], and a sub-sequence of values to be removed from the first … Read more