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 is nice. I'm wondering why it doesn't work with some cases on regexer.com, one example it didn't match is dmc demotic.
Nice, I didn't think about filtering out the two-word cases by comparing with the original argument.
Nice, I didn't think about filtering the two-word cases based on equality with the original argument.
Thanks for pointing this out and sharing.
Yes, and I just learned from this that ** is an exponentation operator. so n**3 is n to the power of 3. Same as Math.pow(n, 3).
Agreed, thanks for the comment.
Bad indenting on the
return
. With code this short, you can also basically remove all the empty lines.