Click here to Skip to main content
15,867,860 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
A user is asked to enter n number of characters (alphabets, number, characters or anything). as soon as he clicks on the execute button, all the possible combinations of those characters entered by the user should be displayed on the screen including the count of the combinations. the user should be able to sort out or filter the results as per his requirements.
can anyone suggest the approach to be used?
Posted

1 solution

You may use a recursive approach.
Or, if you are a bit lazy, you may also Google for (or you may read this CodeProject's article: Permutations, Combinations, and Variations using C# Generics[^].
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 21-Jan-13 4:08am    
A bit... :-) Fair enough anyway, my 5.
—SA
CPallini 21-Jan-13 4:44am    
Thank you.

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