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.
Please see if this article helps: https://docs.codewars.com/training/training-example#writing-a-solution
This comment is hidden because it contains spoiler information about the solution
( at least JS, Haskell )
This is not tested. In fact, the description seems not to specify the task at all.
Approved, thanks! Sorry about the remark, it was an oversight from my end :-)
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.
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!
Approved.
Haskell translation for approval
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.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.
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.
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.
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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...