If I know that one set is a subset of another set and I would like to find the difference, what's the most efficient way to do this?
ex. PSEUDO CODE
> set<int> set1 = {1 2 3 4 5 6 7 8 9 10}
> set<int> set2 = {5 6 7}
I want to subtract set2
from set1
:
The answer here would be
{1 2 3 4 8 9 10}