Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a set of numbers
Is not known how many number inside

For Example:

in the list [1,2,3,4]

i want out put the result:

1,2
1,3
1,4
2,3
2,4
3,4
1,2,3
1,2,4
2,3,4

I want to answer in this article and another article is not in the sense explained in detail here in this article.
Posted
Updated 13-May-11 9:48am
v2
Comments
Marc A. Brown 13-May-11 15:40pm    
Sounds fairly straightforward. What have you done so far? And what problems have you run into?
#realJSOP 13-May-11 15:48pm    
You're posting a message to an article author in the WRONG PLACE. BTW, why aren't the individual numbers valid output as well?

1 solution

This article should do what you want: Permutations, Combinations, and Variations using C# Generics[^]

If you have already found it, then it looks pretty simple to me: perhaps you need to read it a bit more closely.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900