Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
  • Incomprehensible description:

    If no number was deleted from the array and no difference with it

    Please clarify the second condition.

  • Is '12-34:56-78:90-12' a correct MAC-Address? Your solution says, it is.

  • It would be better to hardcode the correct result in the training test.

    Since I see how the validation works, I can abuse it.

    For now, simply returning an empty array completes all the tests.

  • Hi.

    At the moment I can't write random test that would be work well, but I update test cases.

  • Thanks, I deleted it.

  • Hi, thanks.

    I updated test, add new fixed with different data and check on return already sorted array.

    At the moment I can't write random test that would be work well.

  • Ok, shuffled tests removed from the example tests. And I will write some random tests.

  • The random tests are only "random" in the aspect of shuffling, but this does not circumvent that a solution would hard-code the answer, since it is always the same answer that has to be provided, independent on how the input was shuffled.

    Currently, one can pass all the tests with this code:

    return [
                "Departure" => "Madrid",
                "Arrival" => "Barcelona",
                "Transportation" => "Train",
                "TransportationNumber" => "78A",
                "Seat" => "45B"
                "Departure" => "Barcelona",
                "Arrival" => "Gerona Airport",
                "Transportation" => "Bus"
                "Departure" => "Gerona Airport",
                "Arrival" => "Stockholm",
                "Transportation" => "Plane",
                "TransportationNumber" => "SK455",
                "Seat" => "3A",
                "Gate" => "45B",
                "Baggage" => "334"
                "Departure" => "Stockholm",
                "Arrival" => "New York",
                "Transportation" => "Plane",
                "TransportationNumber" => "SK22",
                "Seat" => "7B",
                "Gate" => "22"

    Instead, provide a few completely different fixed tests, and design truly random tests: for instance, produce a random subset of a larger set of cities (or just use "A", "B", "C", ...), linking departures and arrivals in a random way: that would prevent submissions like above.

  • The example tests are the same as the final tests. It is better to remove any random shuffled tests from the example tests. In the example tests only enclude some fixed, non-shuffled tests.

  • The $boards in the initial code is pointless. It doesn't do anything, and if anything are going to be preloaded it should be in, well, Preloaded.

  • Random tests are not "shuffing the content of the same test case that we need to sort out anyway".

  • My program passed test but it fails in random test.

  • i am having this error....
    /home/codewarrior/src/main/java/Kata.java:1: error: package org.apache.commons.lang does not exist
    import org.apache.commons.lang.ArrayUtils;
    1 error

    FAILURE: Build failed with an exception.

    • What went wrong:
      Execution failed for task ':compileJava'.

    Compilation failed; see the compiler error output for details.

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

  • Loading more items...