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.
"Good" is pretty subjective. It can be good or good enough in some cases, but might not be in others. It certainly isn't optimized and is not efficient when you feed it large arrays.
Since it iterates over the array once for every element, it needs to access the array n*n times (n being the length of the array). An efficient solution only iterates the entire array twice, so it would need to access the array 2*n times.
In Big O notation, the first solution is O(n^2) (quadratic), whereas a optimal solution runs in O(n) (linear).