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.
This comment is hidden because it contains spoiler information about the solution
Less optimal with larger numbers, but a very clean solution.
This is the fastest and best solution.
I'm not educated in programing, but isn't that n^3?
.map .each_cons .map O(n^3)?
Just one small nit.
size
is preferred overlenght
https://rubystyle.guide/#map-find-select-reduce-include-size
Thank you for this! I was so confused I had to search for tips in the discussion. It is clear now and yes I agree the kata description needs to be updated with your suggestion.
I didn't know about lazy enumerables until your comment. Thank you!
The problem statement implies that test_even(2.0) should return
true
, but this code will returnfalse
.Updated to Node v14
it doesn't. "shadowing" implies overwriting, which is not the case here.
puuuurdy good 🦊
I like this implementation of round!~
JS function name should not be
every
since it shadows an existing Array prototypeLoading more items...