Let's say I have the following values ββin a set of integers:
{1,3,4,5,5,6,7,7}
The result that I expect will be {5,7} .
How can i do this? Perhaps using LINQ?
EDIT: The input collection is not sorted, so the algorithm should not rely on consecutive duplicates. Also, it doesn't matter if the resulting duplicate collection is sorted or not.
source share