Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    I don't quite understand your problem, but the rules should be the same for all ships.

  • Default User Avatar

    And I thought I was the one with the sloppy code.....

  • Default User Avatar

    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.

  • Default User Avatar

    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”.