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.
why 20? maybe Math.log(num)+1 ?
This comment is hidden because it contains spoiler information about the solution
findAny() better
findAny() better findFirst()
so slow
bad idea don't do it
your sorting solution has a complexity of O (LogN) when this problem can be solved in O (2N)
see my solution, it passes the tests but does not work correctly with negative values
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
this O(logN)
its kata can be solved O(N)
Insufficient coverage of tests in the java language. If we take all the numbers negative, then the output does not correspond to the condition of the problem.
sum(new int[]{-1, -50, -100})
assert -50
it's have BUG.
System.out.println(sum(new int[]{-1, -50, -100}));
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...