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.
oh cool! Hadn't heard of this one before
I've learned something new.
This is solution is more concise.
Why use [] ? because we need to return an array after using ...?
bruh
if a is longer than b,
b is a, a is b
It's the spread operator and no, you can't use an array there, the method won't work.
What does the ...arr mean? is it basically just saying to use that arr? do you have to put ...arr or can it be just arr?
O(2n) ~ O(n) :D :D :D
I assume ImmePak meant that the function iterates through the array twice: once to find the minimum, and again to find the maximum. Thinking about performance, it's theoretically unnecessary and somewhat inefficient to do that. (I don't know whether V8 optimizes it away; I assume not).
However, I find this solution simple and easy to read. If this function would be called infrequently and on small arrays, it would waste only an insignificant amount of time.
What do you mean by "array double check"?
Nice work!
People, are you serious?
Top ranked solution with array double check????
Petty sure I cheesed this one on accident.
A test like ())))))) should fail this.