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 solutiion works much faster than first, esecialy for big arrays
there are benchmarks for 100 000 000 elements
find_outlier_1
10.340000 0.270000 10.610000 ( 10.611158)
find_outlier_2
1.960000 0.000000 1.960000 ( 1.968448)
find_outlier_1
9.890000 0.320000 10.210000 ( 10.219760)
find_outlier_2
7.720000 0.000000 7.720000 ( 7.731714)
Definitely better than the "top" answer... and mine too, for that matter :)
Completely agree! It's also closer to how a human would work it out manually. For relatively simple tasks like this, the "obvious" approach that omost people would take, tends to be the most optimal too.