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.
I knew I could solve this with regex... I need to get more comfortable and more practice with using it. Just took the freecodecamp class on it. Good work!
Same dude.
For me, every single one liner is very readable, but long blocks of code are unreadable.
Agree with you. 99% of one-line-solutions are badly readable and looks like a mess. Really cannot understand a beauty of those solutions. Moreover, I guess, most of guys think, that more short code is, more fast it is :)
value == sum() returns bool value, no need to convert it to bool()
The sort in the couter chain on line 2 is totally unnecessary since the reduce returns an object. However nearly 30 people came up with this exact solution.
Every time I see these type of solutions it reminds me tha I have a lot to work on. I can understand this code easily, but my brain cannot come up with this solutions. Well done.
@Firefly2002
I'm here to write exactly the same comment except now its 6 + "20 more warriors".
With a relatively complex problem like this, if you ask 1,000 people to code it, I would expect 1,000 distinct answers.
I am having problems solving the random questions.
In the output I get
array = [26, 28, 28, 1, 33, 7, 25, 16, 2, 1, 29, 15, 21, 31, 13, 25, 6, 10, 0, 26], Result: 0.0
Expected value near 0.0000000000, but got 12.3371313493
I can't see why this would not be processed and return 0. It seems valid to me. And how should 0 be processed.
This comment is hidden because it contains spoiler information about the solution
12 people all with the same answer.. yeah, no not suspicious at all.
22222 = 32 (2^5)
2+2+2+2+2 = 10
32%10 != 0 :- Therefore the sum of products of primes for 32 is not a factor of 32
This comment is hidden because it contains spoiler information about the solution
Is that so? 8)
Well, after checking a bit further, I see that these numbers are (almost) as rare as Mersenne primes... (see my new solution :-)
Loading more items...