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.
For the people who care about time complexity, this elegant solution is still of O(n).
The spread operator still loops through every element until exausted.
So even if you did a for loop (like I did), it is still O(n).
This made me laugh so much hahaha