2.1 KiB
2.1 KiB
id | challengeType | title |
---|---|---|
5900f4bd1000cf542c50ffcf | 5 | Problem 336: Maximix Arrangements |
Description
However, Simple Simon, the train driver, is not known for his efficiency, so he always solves the problem by initially getting carriage A in the correct place, then carriage B, and so on.
Using four carriages, the worst possible arrangements for Simon, which we shall call maximix arrangements, are DACB and DBAC; each requiring him five rotations (although, using the most efficient approach, they could be solved using just three rotations). The process he uses for DACB is shown below.
It can be verified that there are 24 maximix arrangements for six carriages, of which the tenth lexicographic maximix arrangement is DFAECB.
Find the 2011th lexicographic maximix arrangement for eleven carriages.
Instructions
Tests
tests:
- text: <code>euler336()</code> should return CAGBIHEFJDK.
testString: assert.strictEqual(euler336(), CAGBIHEFJDK, '<code>euler336()</code> should return CAGBIHEFJDK.');
Challenge Seed
function euler336() {
// Good luck!
return true;
}
euler336();
Solution
// solution required