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.
Noob question.
There are four times the loops, but the amount of character comparison stays the same. Is just looping through the string really this much less efficient than the comparison you make with each character, that it alone quadriples the workload?
If you mock beginners for bad practice, it'd be nice to explain what's wrong about it.
And here I am thinking that good algorithm is the most optimised one and based on math as much as possible. Stupid me.
I tried to find and figure out the formula too. I spent like an hour trying to do actual math but sadly I failed. On the other hand I found another solution. Not the most elegant one but it's fairly simple.
I'm sorry
This comment is hidden because it contains spoiler information about the solution