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.
It might be a "Best Practices" but NOT "Clever" at all.
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?
Potentially helpful links:
Yes, there is solution in O(1) time, but this solution is O(n)