Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
  • 3484906?v=4

    Incomprehensible description:

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

    Please clarify the second condition.

  • Profile pic

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

  • 9448101?v=4

    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.

  • 7109322?v=3

    Hi.

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

  • 7109322?v=3

    Thanks, I deleted it.

  • 7109322?v=3

    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.

  • 7109322?v=3

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

  • Profile pic

    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.

  • Profile pic

    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.

  • 14909989?v=3

    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.

  • 14909989?v=3

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

  • 35849008?v=4

    My program passed test but it fails in random test.

  • 26367605?v=4

    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.

  • Profile pic

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

  • 32197188?v=4

    Source 1,2,3 Mixed 2,1 - test fail - expected 0 :/

  • Loading more items...