开发者

Getting all permutations of a word or number

开发者 https://www.devze.com 2022-12-19 14:52 出处:网络
Using LINQ or the old-fashioned approach, how can I get all permutations of a word/number (without using an external API)?

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, et开发者_开发百科c

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消