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.
You avoid division but does it worth it while floating point precision is enough to handle this kata?
In sample tests -> encode -> repeated numbers -> 3rd test:
Why
((((((((( 122222 \\\->9(5 \15\2 3\\\and not9(5 \15\2 3\\('3' followed by an escaped backslash)?Thank you for the feedback, done :)
I think you should incude the examples from the description in the sample tests.
Nice and tidy kata — short, elegant, and a good reminder of how powerful map really is! 👍
Haskell translation
cool man, nice resolve
Test limit needs to be massively increased in order to prevent hardcoding like this or this
Explicitly inviting people to approximate
Infinitywith "sufficiently .. so that the first1 001remaining numbers are unchanged" is not my cup of tea.I know we can't test to infinity, but what's happening here is just cheesing the tests IMO. Not even the example solutions tries to lazily generate the infinitely defined sequence, to then use the immutable prefix to return results. ( This is not simple; I could not make it work in the limited time I tried, but it is possible. )
Compare that to this ( Haskell ) or this ( Python ). That is how you treat an infinite sequence. Well, in my cup of tea.
Not an
Issue. Other opinions may be available.Done.
The former. I'll add something to the description to clarify.
Fixed.
Fun to learn about a different sieve than Eratosthenes for once!
Do we return the
nth element of the limit forN -> Infinityof the sieved list, or do we getNas an argument?This should be specified in the description. ( No, I don't want to open the trainer for it. )
Eratosthenes of Cyrene may be long dead, but he was a person and deserves his name capitalised.
Loading more items...