I have N numbers of sets, say, integers. Now I want a function that finds me at the intersection of these sets. For example, for the following
Set1 = { A, D, E, F, G, L } Set2 = { N, K, E, G, B, C } Set3 = { K, P, Q, E, F, G } Set4 = { Z, Y, C, G, F, E }
Since E and G are in each set, I have to get { E, G } as output. The easiest way to do this. I know that it is not very difficult to write your own code, but perhaps there is already an STL or any other library function that I am interested in for this.
source share