It is necessary to develop an algorithm to solve the following problem
Given:
The N sets with a different number of elements
Expected Result:
The new M sets containing ≥X common elements of the N sets
Example:
N1=[1,2,3,4,5] N2=[2,3,5] N3=[1,3,5] N4=[1,2] if X=3: M1=[1] (from N1,3,4) M2=[2] (from N1,2,4) M3=[3,5] (from N1,2,3)
source share