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.
I saw An answer within minutes by looking at the tests.
Not the best answer, though.
@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!What language?
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.