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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
dont need sortFunc
Is
function sortFunc(a,b) {return a-b;}
needed here?I mean, it does not matter how we sort the arrays as long as we sort them both the same way.
still you dont know what words will somebody put to smashed :) mby smashed is " hello', 'world', 'this', 'is', 'great ' so....... Be careful, there shouldn't be a space at the beginning or the end of the sentence! ;)
i think the increment could be i+=3 instead of i++
so u can simplify the ret calculation into
ret += 1f/i
xD
This comment is hidden because it contains spoiler information about the solution
This assumes the elements are numbers.
This is probably my fave approach to this. Very simple and straightforward!
Yes it does. I did the same to mine.
This comment is hidden because it contains spoiler information about the solution
I am new to this syntax. What is does the .filter do and what does v => mean?
This comment is hidden because it contains spoiler information about the solution
Clever but not best performant.
This comment is hidden because it contains spoiler information about the solution
Loading more items...