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.
There is no real convention, no.
My rule of thumb is that if it makes the code cleaner and easier to read and maintain (this last point being the most important), then use streams. If not, then use normal loop iteration.
This comment is hidden because it contains spoiler information about the solution
not for this task, way too slow
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
No, it will fail with an
ArrayIndexOutOfBoundsException
.I did not know about the removeIf method until seeing your solution, very useful!
The power of ES6
Kata says:
Cool
Wow. It's cool
Nothing. Regular string concatenation faster that String#format. You can find in google performance of regular concatenation and String#format.
In case when sum of all numbers < k your code will be execute infinity
If the passed array has no missed letters, your solution will end with ArrayIndexOutOfBoundsException.
For instance, ['a', 'b', 'c', 'd', 'e'] -> ' '.
bad performance
Loading more items...