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 use spoiler flag, comments are visible from the dashboard. I added it for you this time.
This comment is hidden because it contains spoiler information about the solution
As stated by @Unnamed, the random tests expect
false
ifchecksum <= 16
even if the return value should betrue
, forcing to hardcode this part...The random tests in JS always expect
false
for checksums below 10.Fixed
Definitely more in the spirit of the question
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The random tests in JS generate strings with 1-digit checksums and expect
true
.Nice mathematical way to get the sum of the squares. I wonder if this is more or less performant than splitting the string of digits and mapping each to a square?
No need to argue, just benchmark and see ;-)
Not anymore
[C#] (https://www.codewars.com/kumite/5a65f939e6be387c65000059) translation added :)
Both fixed ;-)
Why are you freezing
String
,Array
and their prototypes?You might at least mention this in the Description; it's the first time I'm seeing that being done. Usually, my
String.prototype.reduce = Array.prototype.reduce
works just fine.If it's an anti-cheat-measure, why are you not freezing
console
?Loading more items...