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.
readablility most likely
It's been a while but all the words are split, so you'd need to do it for every word separately.
This comment is hidden because it contains spoiler information about the solution
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 ran some benchmarks. This solution is faster than the "efficient" alternatives for "small" to "moderate" length strings; but as the input length increases, the difference between them shrinks until the efficient methods scale better for much larger strings. If you technically know you'll be dealing with short-ish strings, this can actually be faster.
This is clever but calling count every time is not good at all. Why do people put this as best practice.
how are people putting it as best practice when you loop 10 times over the string ?