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.
Why this solution is marked as Best Practice?
It should not be in real production app: https://github.com/Codewars/codewars.com/wiki/Kata-Solutions-&-Voting#best-practices
I cried a little.
Nuts!
Awesome!
I spent quite a bit of time trying to solve this... This solution made me laugh!
...my god
this is O(n^2) right?
wow, thats so neat
Set intersection is a fairly self-evident way to achieve a solution for uniqueness. The fact that the operator maintains the original order is a benefit.
I wouldn't label it cheating. It makes more sense to label it clever. I don't think labeling solutions as best practices makes much sense for this kata because it precludes the uniq method.
I'm wondering if this counts as cheating...
I see. Thanks for making it clear. :)
This comment is hidden because it contains spoiler information about the solution
Aside from the intersection operation, you might be interested in the union, difference, cartesian product, etc interesting.
Redundant now, but yes, Set Intersection. Easy way to remember is that sets contain distinct items, and no duplicates.
Would anyone be so kind as to explain how this works?