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.
sorting is O(nlogn) and summaryStatistics is O(n) (i think), so sorting is a lot slower for larger arrays
I considered using it but in the end, sticked to sorting - does anyone know how summaryStatistics compares to sorting performance wise
me neither, since 1.8 ...
This is a "classic" approach, maybe it is the one that perform betters with just an iteration compute the minimum and maxium value,
even if actually we tend to use more stream operation, I have to admit that this, IMHO, the way to go.
Really nice solution,
I sincerelly didn't know the existence of the summaryStatistics method from the IntStream class.
This comment is hidden because it contains spoiler information about the solution
I agree with you, there is, IMHO, no need at all for thread safety here