Efficiently finding the intersection of a variable number of sets of strings

后端 未结 7 820
旧时难觅i
旧时难觅i 2020-11-27 06:14

I have a variable number of ArrayList\'s that I need to find the intersection of. A realistic cap on the number of sets of strings is probably around 35 but could be more. I

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-27 06:44

    There is also the static method Sets.intersection(set1, set2) in Google Guava that returns an unmodifiable view of the intersection of two sets.

提交回复
热议问题