用于为给定数字集高效生成置换的代码C#

问题描述:

任何人都可以写信给我或给我一个链接,在其中我可以找到C#代码以最有效的方式列出给定数字集的所有排列?

Can anyone please write or give me a link where I can find the C# code to list all the permutations for a give set of numbers in the most efficient manner?

不确定它们的效率如何,但是这里有一些选择:

Not sure how efficient these are, but here are some options:

  • http://www.codeproject.com/KB/recipes/Combinatorics.aspx
  • http://www.codeproject.com/KB/recipes/premutations.aspx
  • A C# implementation of Knuth's solution