Ad
  • Custom User Avatar

    ( at least JS, Haskell )

    a function that removes the spaces from the values

    This is not tested. In fact, the description seems not to specify the task at all.

  • Custom User Avatar

    Approved, thanks! Sorry about the remark, it was an oversight from my end :-)

  • Custom User Avatar

    JS Fork with the testing code upgraded from v8 to v18, and, as such, also upgraded to Mocha. Test layout was cleaned and feedback to user was slightly improved. Console logging was removed.

  • Custom User Avatar

    If this ever gets approved, someone will have to check if random tests in all languages generate compliant inputs.

    Don't just make up specs that were not there before!

  • Custom User Avatar
  • Default User Avatar

    Haskell translation for approval

  • Custom User Avatar

    The kata expects that you don't create a new array (String[] result in your case), but you modify in place the array that you receive as a parameter.

  • Custom User Avatar

    Yes, unfortunately. You have to modify the array in-place and to return the array that you get as a paramater until it gets fixed.

  • Custom User Avatar

    Java - random test fail:

    "array contents differ at index [1], expected: but was: "

    In my code i dont have double value from index 0, I dont understand why I get that error.

  • Default User Avatar

    To amplify the previous report in re the random tests expect the input as the result...
    Try this:
    public … {
    return array;
    }
    When you Attempt, it will pass the Random tests, and it shouldn’t.

    srfoster’s solution should work, but they had to do a workaround to get past the bug.

    Also, the problem wording is ambiguous (politically correct for “it sucks”). The actual solution does not match the scenario - the solution sucks up much more space.

    Better wording which matches the solution:
    “Write a function that takes a String array and returns a String array in which each element is the contatenation of all preceding elements plus the current element.”

    Wording which matches the scenario:
    “Write a function that concatenates the elements of a String array.”
    Then overhaul the solution and make it 8 kyu.

  • Custom User Avatar

    This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/189.
    Please join the discussion to help us identify duplicate kata and retire them.

  • Custom User Avatar

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

  • Default User Avatar

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

  • Custom User Avatar

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

  • Default User Avatar

    Yes

  • Loading more items...