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.
Hi All,
about the filter callbacks, it is much more readable (a best practice) to use arrow function, and spare the closures, 'function', 'return' words.
Also why use filter, when we look for a position/index and there are array methods for that in JS.
Also return result (number.indexOf(...)) will perform a 3rd operation over the array. Not that the first 2 loops (filter) are necessary..
There should be better solutions in terms of best practices and cleverness IMO.
Sorry to spoil the pleasure of your findings
Hello All,
I'm new to the platform.
Is there a way to benchmark or compare the solutions by time/space complexity?
Thank you