I got a list:
var list = new List>();
which could contain
list[0] = {1, 2, 3, 4}
lis
You could write your own implementation of IEqualityComparer. For >
GetHashCode() it would simply return the XOR of all the hash codes of the elements in the list. For Equals() it would create a new HashSet from the first list, and call HashSet
Once you've got that far, you can use Distinct:
var distinct = list.Distinct(new CustomEqualityComparer());
As an alternative approach, could you use HashSet as your collection type to start with? Then it's really easy:
var distinct = sets.Distinct(HashSet.CreateSetComparer());
If you need lists as the input but can cope with sets as the output:
var distinct = list.Select(x => new HashSet(x))
.Distinct(HashSet.CreateSetComparer());