ROSECODE 301
Special Order I
Consider the sequence of characters A B C D, each character being taken twice.
It is possible to order this sequence in such a way that:
- There is 1 character between 2 As
- There are 2 characters between 2 Bs
- There are 3 characters between 2 Cs
- There are 4 characters between 2 Ds
Find the last such order in lexicographic order for the sequence ABCDEFGHIJKLMNOPQRSTUVWXYZ_ (each character is taken twice)
[My timing: < 1 sec]