3 ms·
It seems amenable to constraint propagation + search. Assuming no repeating digits to start with, each digit is assigned a position variable on which sequence c
by sriku 6y ago
It seems amenable to constraint propagation + search. Assuming no repeating digits to start with, each digit is assigned a position variable on which sequence constraints can be applied, propagated and searched. You might end up with no solution if the tightest length of the sequence is assumed, so the search process must also relax that to the extent necessary to find one .. in which case you'll have holes in the result I suppose.