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.
@benbrnpetit for larger datasets push will be more performant than unshifting. When you add an element to the end of an array, it can be done instantly. When you unshift and array, you must move the entire array forward, which takes more time with larger arrays of data
console.time() gives me around 0.115ms for both methods.
from the end through the push will be faster
Nice solution, but how did it pass the autotest? If one of the numbers ends in zero, it's an extra 0.
for example, 3474 and 33440.