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.
To make the challenges more challenging for me I'm aiming for minimal code instead of product quality code ;)
supper dupper hard to read, could not you use some meaningful names
This one knows golf.
Length of sequence times average of sequence equals sum of sequence.
true, there should be a test case for that
What about if null is passed?
First time i tried something like this, but have
Maximum call stack size exceeded
Excuse me, could you explain the same stuff you wrote, but for dummies who are not into math?
Genius
True, replacing
nums
with[...nums]
would fix it if that is neededBe careful. This solution will change the initial array.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
"Note that the array is sorted in place, and no copy is made."
Should be fixed
Are there any time- & spacecomplexity Kata-Stats to checkout ?
This comment is hidden because it contains spoiler information about the solution
It looks so good but why does it work?
Loading more items...