4

Using LINQ or the old-fashioned approach, how can I get all permutations of a word/number (without using an external API)?

Eg ab = ab, ba, abc = acb, bac, etc

Is this a specific computer science problem like image recognition, etc?

1
  • search google for keyword "next permutation" algorithm Commented Feb 10, 2010 at 15:19

1 Answer 1

5

There is a fantastic MSDN article on this very subject that should help you get started. This is a very well-studied computer science problem. For additional reference, see fascicles of The Art of Computer Programming Volume 4. In particular, check out Pre-fascicle 2B which exactly covers the problem of generating all permutations.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.