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.
...my god
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...
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?