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 example doesn't include the maximum of the Integer Range.
The better solution will be the BigInteger usage.
For more bigger numbers IntStream is much slower then simple loop.
not really, i have almost similar benchmarks
Using the Comparator here cause the perfomance gap. This code is 3-4x times slower then loops.
It looks minimal and nice since it is Java 8 but i have a little concern about it.
Well, first it is bad in perfomance part. On my PC it is about ~3800000 nanoseconds to run this. The reason why is simple: lambdas.
Also minor, but not last is the variable naming. IMHO, strs, f, st is not readable.
Less iteration, more perfomance.
Basically it is the most perfomance example: on my pc it is about ~500000 nano seconds which is best solution out there.
Nice!