0

I have a set ={1,2,3,4}. I want to create power set of this set. One way to create the power set is to take every element as binary(0/1) and print all possible combination.

I was thinking about some utility/library in java to do the same.

Mosbius8
  • 119
  • 6
  • 4
    Guava offers [this](http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/collect/Sets.html#powerSet%28java.util.Set%29). – Sotirios Delimanolis Sep 16 '14 at 05:36
  • You did not mention your use case but unless your sets are really small this is probably not what you want. Consider other ways to solve the underlying problem. – Henry Sep 16 '14 at 05:41

0 Answers0