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
This comment is hidden because it contains spoiler information about the solution
I didn't know about those lookaheads, that's pretty powerful. Thank you for taking the time to write that down. :)
Using
count
instead ofsize
orlength
makes a huge difference:count
traverses an Enumerable, so you're losing a lot of CPU time for nothing, especially on large collections.http://batsov.com/articles/2014/02/17/the-elements-of-style-in-ruby-number-13-length-vs-size-vs-count/
There's no point using a splat if you divide explicitly by 3. Divide by
scores.size
if you want to be relevant.Feels good when you find that in the docs, right? :p
Perk: Woarks for all polygons.
To improve: Only works for 2D barycenters.
Nice, I always wondered how big my hyperboxes were. :p
Wait, what?
This one actually made me laugh. Like, a sincere and natural laugh. :)
Can someone explain in detail this one?
It's funny to see the oneliner and the Enterprise Edition next to each other :')
Is this mathwars? :P