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.
Its complexity is O(2n^2), it is very inefficient solution
That's really great. No expensive operations with arrays, short and clear.
My solution is much more worse, but I feel, that here are too many manipulations with arrays - it is expensive operations
The variant with a simple loop solution takes about .3 seconds with a number of 100.000.000
This solution takes about 17 seconds!! It is not a very good answer. But, of course, interesting )