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.
Too many loops. try doing it with two. Took 2100 ms for 10000000 runs
Calling it a bad method is not correct.
It is a naive method, and not intended to be fast.
It is a useful attempt, because it works - and for CodeWars, we get to see the more advanced answers, and try to understand how they work.
These are often written with functions and methods that newer coders do not know exist, or that are difficult to parse.
bad method
Does this run all 3 loops each time?