需要开发一个算法来解决以下任务。
给定:
给定:
The N sets with a different number of elements
预期结果:
The new M sets containing ≥X common elements of the N sets
例子:
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)