Joe Wilson

Joe Wilson

  • NA
  • 7.8k
  • 417.9k

How to create all subset of a set in C#?

Sep 20 2014 7:50 AM
I mean if user add  the amount of a set  and add his/ her numbers at the end compiler gives and calculate all of the subsets of the set which have been created.
 
for example: 
size of set: 3 
parameters of set: 5 , 3, 2
 
result:  {5} ,{3} , {3,2} , {2} , {} , {3,5,2} , {5,2} , {3,5}

Answers (3)