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.
Cool
This comment is hidden because it contains spoiler information about the solution
I really liked the challenge, however as a person who learned to program from Ruby, may I suggest to expand on the instruction or the tests, it took me a couple of tries to understand was it was that the challange wanted from the user. Other than than that, great challenge. Looking forward for more.
Actually, shouldn't it be ["123"]?
This answer is incorrect.
This solution violates the 'S' in SOLID design (methods should be single-purpose). It's an interesting example because it demonstrates the problems with violating single-purpose methods: the other two methods don't need the transpose (which is an expensive op) but are paying the computational cost to avoid replicating the code to handle the edge cases.
I also wasn't willing to submit a solution which wasn't DRY, so I refactored my solution progressively after it passed. The edge cases fall out neatly into their own method.
Should be
3