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.
filter() returns an iterator, so it has to be turned into a list to match the output format
I'm new to programming and still learning how to use dictionaries. Your solution showed me a great use for them!
very elegant solution
Nice use of any. Makes this better than using next like I did.
please help me understand it
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)
Very clean, and nice solution. Even It has issues.
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.
This comment is hidden because it contains spoiler information about the solution