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.
but why you created a class?
nice, not sure why I didn't think of this
I don't think so.
I'm not sure of that, but probably
singleWhere
will always tranverse the whole list to ensure the condition was just met once.Given we know that only and just one number will be a outlier, using
firstWhere
is better thansingleWhere
.it does not just iterate over the whole list (in worst cases), but also duplicate it
Seeing the other solutions, definitely not a clever solution nor a best practice ^_^
Thanks for sharing everyone :)
The use of singleWhere is brilliant! Why write new logic when the language already provides it :)
I like how clean the code is, but from a optimization point of view I don't think it's very efficient to always iterate the entire List. Or am I missing something?
I really like this solution, clever approach! Didn't look at the puzzle this way :)
Wow, I'm really surprised by the creativity in this solution! :) Did you go for solution with that in mind?
If your boss pays you for code lines count than he must fire you.
Well, for me it actually is.. I have a hard time grasping the overall idea behind this solution. Requires some studying to figure this out.
Really like this solution. Though it might seem overkill, I think this extreme OOP approach makes this piece of code really transferable to other developers of different skill levels. I can see your thought process just by scanning the classes and methods :-)
no matter how I look, this is just overkill!!
Yeah.Aha,I can't compose this code anyway,it's an opportunity for me to learn.
A positive shock?
Loading more items...