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

sql joins as venn diagram

I agree with Cade about the limitations of Venn diagrams here. A more apposite visual representation might be this. Tables SELECT A.Colour, B.Colour FROM A CROSS JOIN B SQL Fiddle The cross join (or cartesian product) produces a result with every combination of the rows from the two tables. Each table has 4 rows so … Read more

tech