Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Why is this not done for arrays with variable lengths? First, odd and even arrays have different characteristics; second, only requiring to solve for 1 length instead of all arrays in general makes the problem very boring, and becomes a puzzle rather than a kata.
The tests are unnecessarily obtuse: it doesn't even show what the actual array length or the exchange end result is when the tests fails, which is unacceptable.