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.
But in O notation it will be 3x vs x² i think this is still better than having nested maps or foreach.
For me , this is not best practise , because you will calculate the min and max while the input array is already sorted , view my solution.
There is another, third option.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I was tempted to use the array_map(), max() and min() functions but with this solution each array is scanned 3 times. Which doesn't pose a problem, we're fine with small arrays.
ok, the random number is now 0 and the guess is 1 but shouldn't they both be the same number to pass the test?
Of course! ... a switch case statement was a better option, veryt clean and a go to way of doing things when the options are predefined.
How???
Omg, why didn't I even think of this??
Great
$this->check(basicOp('/', 4, 0), 0);
Division by zero :(
Indeed:)
I am new on javascript dose this work for other languages.
how does this work??
Loading more items...