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.
Yeah totally agree !!!
There's no point in putting a character group in square brackets too.
You don't need extra space in character class,
[\s]+
will do the sameDon't mutate the input.
@CodingBuddah,
I have the same issues as Hendeca in python (any version). It only worked after I hardcoded it to recodgnize the random tests and in those cases give an output that REMOVES the zeroes instead of moving them to the end (contradicting the instructions).
But i DID notice that i can fork accepted solutions and run them without errors in the random tests. No Idea what is wrong there (because my output is definitively accepted as correct if, and only if, i purposely produce "incorrect" output at the random tests).
Here's my solution (Any Idea on what the problem could be)?
I solved it in different ways in either Python and Javascript, without hardcoding anything. what language are you using?
@chucklesoclock
0.0 is a number, '0' is a string.
Yes, this is very broken and the instructions are unclear besides. Why 0.0 --> 0 but '0' --> '0' is beyond me.
I'm not sure if i'ts an anti-pattern or not, but I often flatten the list into one dimension and instead calculate a row length. In this case since the list lengths are constant, it is very easy to work with
I recommend changing the names of the arguments for the function or at least including a description of what each one is in the description. I printed each to see which was the element to count and which was the actual array which is an unnecessary step
Ah, similar but slightly different! I'll check it out, thanks :)
This comment is hidden because it contains spoiler information about the solution
Hendeca, check out my kata :)
Until the problem is fixed, I added a check for the basic tests. If the test is one of the basic tests, the correct solution is returned. If it is not one of the basic tests, the array with all 0's removed but NOT moved to the end of the array is returned. This solution is accepted despite the kata being broken.
This kata is broken and can only be solved by hardcoding the basic tests so that you know when the random tests begin. The random tests do not follow the rules of the kata. Instead they require that you return the array with all 0's removed (and NOT moved to the end of the array). Please fix this broken Kata. It is obviously broken and has been for quite a while. PLEASE FIX IT.
The method will still return false. The only way to reach the else clause is if both arrays are not nil.
Loading more items...