Java : Cartesian Product of a List of Lists

后端 未结 12 1095
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-02 19:03

I have a problem that is really kind of a general programming question, but my implementation is in Java, so I will provide my examples that way

I have a class like

12条回答
  •  情书的邮戳
    2020-12-02 19:37

    Guava has a utility method which returns a cartesian product of the given list of sets: Sets.cartesianProduct.

提交回复
热议问题