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.
man I gotta say...super beautiful thinking. Amazing answer and amazing solution.
I did the same calculus, but you put it so, so beautifully in code. So clean.
All the respect man.
nice kata!! az! just keep it simple!
Scala translation
CoffeeScript translation
u mean my answer?
I saw An answer within minutes by looking at the tests.
Not the best answer, though.
This comment is hidden because it contains spoiler information about the solution
@RealDeepazz this is because you are modifying the original array. The kata currently has a function declaration with this array designated as
const
, so it should not be altered whatsoever. Perhaps copy your code (to save it), refresh the kata trainer, then work on an algorithm that does not mutate the input. If this declaration was in fact given to you with theconst
designation and if you then changed that so you could replace any of its contents... well, don't do that!c
in c buddy I got only get to 40ch there is no way I could get to 40. can you check?
What language?
Hey boss! I pass the basic tests, but I fail to pass the complete test while I believe the results are correct.
for instance:
< Incorrect Result >
array = {0, 0, 10, 9, 7, 0, 0, 6, 5, 0, 0, 0, 0, 1, 0}
Submitted: 38
Expected: 21
< Incorrect Result >
array = {0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
Submitted: 17
Expected: 0
Random_Tests
< Incorrect Result >
array = {0, 0, 0, 0, 7, 0, 0, 0, 0, 3, 2, 0, 0, 1, 0, 0}
Submitted: 13
Expected: 2
please respond if needed we can chat in discord!!
The kata works, even if the setup might be somewhat unusual for C. Please see this article for some general guidelines: How to train on a Codewars kata. If you still have problems, you can visit Codewars Disord server, especially its
#c
channel.hey man test doesn't work on c.
Can we discuss this?