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.
good update with !![] to get 1s, but template literal really looks like cheating
still good improvement
Shortened previous kata with template literals, and true/false Arrays converted into 1's & 0's
That's awesome!
I came across this which inspired me to experiment with it.
https://www.kaggle.com/chefele/scripts-first-try
Faster than my attemp, damn that's insane...
both answer is correct.
also found that @FArekkusu's function returns primes < n. It would fail at n = 7, n = 17, etc.
I just had a quick look and yeah, it's basically the same. Just that @FArekkusu used a more efficient approach (subscript assignment to the list
a
thereby replacing thefor
loop you used in yours) to implement it.Wait...that's just my starting algorithm!
https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
And here he comes to steal the show.. lol.
Nice work here. I'm trying to wrap around the algorithm. Kindly explain. Thanks!
Ordered by speed:
So, yes, this one is the quickest.
[deleted]
[deleted]
Loading more items...