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.
Nice! How do you bench such things? Can you give an indstruction on how you did this particular case?
you're actually returning a new string object here, while the problem description is asking you to return the same string in a mutated form.
You can simply add '!' to do that.
Nice solution though!
Nice.Everyday I get more proof that regular expressions are really powerful.
It's a double negation. First it negates a false-ish value (nil or false) to true and then negates it false. With this method you have only true or false output and not true, false or nil.
Gosh! Quite a difference in performance.
Why the explicit return and assignment?
This comment is hidden because it contains spoiler information about the solution
Can someone break down how this works?
this is beautiful <3
To prevent the case ' .'