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.
This comment is hidden because it contains spoiler information about the solution
I don't quite understand your problem, but the rules should be the same for all ships.
And I thought I was the one with the sloppy code.....
You should add tests to this kata to check the function for working with arrays of one element. The solution of some participants (e.g. ElectroYan user) returns the correct result when using a multi-item array as an argument, but returns the wrong result when using a single-item array as an argument.
This problem was found in the C# version, but I think it's the same in versions for other languages.
Your code doesn't work correctly with arrays that have only one argument.
For example, Extract(new int[] { 1 }) returns “1,1” even though it should return “1”.