C
C#16mo ago
popcorn

❔ Find values which are not present in hashsets

I have multiple hashsets of integers and one "main". I want to find all values from "main" hashset which are not present in some of the other hashets, what's the easiest/best way to do this? a) Combine all the other hashsets into one and then do like
HashSet<int> mainH;
HashSet<int> combinedOther

mainH.ExceptWith(combinedOther);
HashSet<int> mainH;
HashSet<int> combinedOther

mainH.ExceptWith(combinedOther);
b) Do it one by one c) Some other way?
2 Replies
phaseshift
phaseshift16mo ago
a) makes sense
Accord
Accord16mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server