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.
We could solve this problem in O(n) time
When splicing, it will change the original array and that in my opinion is a negative side effect of the function.
Thanks for noticing. I will have a look :)
This won't work for finding '91234' in '123456789123456789'.
This comment is hidden because it contains spoiler information about the solution
Why is there a
.filter(x => x)
?ES6-ified