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.
It means you found a typo.
Fixed. Thanks.
Locally you're not using the same input from the tests, not a kata issue.
In your code, with that input value
before + rotors[i]
makes no sense,before
is a number androtors[i]
is either an array orundefined
depending oni
value.This comment is hidden because it contains spoiler information about the solution
what does "one 1" mean here ?
approved
fixed, thanks!
approved
thanks for your efforts
in the Test Cases,
maximize_points()
is still declared as returningunsigned
و الله do not rember the reason for
malloc.h
as it was six years ago...And there is no blind following...
As it seems reasonable to add empty strings (at least for one argument) because it is a 4kyu kata!
But anyway i do think there should be a consensus on throwing away empty strings in all languages or editing the description to include them (not just my or your opinion)!
stringer
)Hello, thanks for considering the changes. I am not criticizing your work in any way.
Following the original version blindly is not a hard requirement on Codewars. When it errs, you do not have to carry it over in your own translation. An empty string is not an usual representation of
0
, and there are many complaints about them in the Discourse (here is the open issue for C with 17 likes).About
malloc.h
, I would be curious to hear about the technical reason behind its inclusion ?Definitely, there was some reason for including
malloc.h
instead ofstdlib.h
and probably you should have to wait for another six years before noting that...
Despite the reason
Updated
to includestdlib.h
instead ofmalloc.h
Added
the case with empty string to Sample Test to inform users that there can be such cases to be compliant with the original version!Edit: though may be i should not do it because another languages do not inform of such cases!
So i will remove it from Sample Test
length
and can potentially be as large as it, so the return type should be the same as well:size_t
also, the fixed test with an empty string is against the specifications and should be removed
#include <malloc.h>
is not a standard C header. can you replace it with#include <stdlib.h>
in the initial code ?Loading more items...