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.
Best practice for sure!
For some reason I didn't understand this. In the end I did it through laziness.
What do the question marks in front of letters mean?
(?a..?z)
I think this is the best solution, since everything is done here in one loop. Genius!
You can also use the
group_by
methodThe road will be mastered by the walking one, so don't worry much.
The best ruby-way
The sum method in this case is more concise and works faster than inject.
Use single quotes unless string interpolation is required.
Yes. But another question: is it best practice to use such a non-concise code? You must remember the order of operations. In my opinion, it is really hard to read. I would use parentheses instead.