0
According to Wikipedia, a Langford sequence is a permutation of the sequence of 2n numbers 1, 1, 2, 2, ..., n, n in which the two 1s are one unit apart, the two 2s are two units apart, and more generally the two copies of each number k are k units apart. An example would be:
3 1 2 1 3 2
Define a...