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
It's smart but for sure it may cause some misunderstanding when someone reads it
Although this is nice and concise, it's an O(nlogn) algorithm, when an O(n) solution is possible.
very clever -zero idea you could form another q within a ternary.
I agree.
Should not be Best Practices because it gets very bad to read if you have many cases. It is Clever, though.
I get [10, 9, 6, 5, 1] for the third test case in python. Can anyone confirm that it's my code that give me the wrong answer?
Thanx!
Ah, OK, I see. Removed, thanks ;-)
Sorry, I wasn't clear enough (might be... ? Or I didn't understand what you both told me, sorry).
This is in the "initial solution" part, that the
n
is still present (even after I "reset" the kata). I get that :IIRC, you can also copy your solution, press "reset", then paste it back to get the current tests
This comment is hidden because it contains spoiler information about the solution
NO,no.. I've already removed it. ;-)
If you still can saw them, just because CW saved a copy of sample tests for you. They will not change with my fix operation. So you have to remove them youself, sorry sir ;-)
Most of time are spent on
arr.map
andarr.min
.I think you should find a better algorithms to do this task ;-)
Perhaps a
sort
will help you a lot ;-)Thanks guys !
But still one thing to do (in python and ruby) : remove the
n
in the solution sample. ;)Loading more items...