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.
If it works - it works, I guess :/
I don't it is ok to write to many line of code only for validation code!!!
Sorting makes it a N*LogN solution, while it can be done in N.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Very complicated but okay if it works ...
how come everyone's multiplications didn't time out. I had to come up with golden ratio solution which will certainly fail for lower n's...
This comment is hidden because it contains spoiler information about the solution
I see, thank you
Why ?
That's not a correct input.
it wrongs with new double[]{1, 1, 1, 2, 1, 1,2,3}
Guess a thought code, robust, no nullpointer and performance :)
I like the if statement within the return but I feel it is a bit harder to read than just using a standard if else for people new to the language.
Thanks!
Loading more items...