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.
thanks for showing the correct way to use .sort() for this problem!
unfortunately .sort() will not work properly because it will sort 10 ahead of 2.
will it work then if we add a function to sort? to be sorted numericaly?!
sides.sort((a,b)=> a>b ? 1: -1);
Actually math.sqrt(num) (+1 as range() doesn't returns the upper limit)
This comment is hidden because it contains spoiler information about the solution
I like this pop/push combo here, I used index jumping in my for loop to get this jump over 2 elements :)