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.
Would have been much easier to read by using a few more lines, in my opinion.
It's your mistake. Please do your math
This comment is hidden because it contains spoiler information about the solution
12,000ms! Is that just for Java? You could put the array length in a variable before the loop. Then it won't have to check during the loop condition.
Actually, the recursion algorithm is the slowest, ~ O(2^n). The best solution would be O(n), huge difference.
This comment is hidden because it contains spoiler information about the solution