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.
Trivial map/filter/reduce is not a novel kata idea.
hmm, I guess I've done match the same, but more complicated :) Nice solution https://www.codewars.com/kata/reviews/5a5e23c47635599816000ac8/groups/5d166b37fdfc750001de6dd3
Input range of
n
is not specified. What ifn
is zero, or negative? There should at least be a test for this.Needs random tests
The same
Have you already realised what's wrong in your question? Those params are refer to lambda "sum" function. Not to accumulate.
The system of equations to solve is
which leads to
Looks a bit complicated... )
Looks nice
This is not tail recursive, and as such is not optimized well. If the list is long, you'd end up with a stack overflow.
What about built-in int64 type for tests?
What about capital letters?
This comment is hidden because it contains spoiler information about the solution
OK, good point ;-)
Added this to description:
And added this to testcase:
Thanks for your feedback ;-)
Loading more items...