How to transfer a list of objects to C #?

I have a list of objects. I need all possible permutations of these objects.

In C ++ exists std::next_permutation(). I am trying to find something in the .NET Framework but came up with a dry one.

What am I missing?

+3
source share
2 answers

I do not think that it is built into the framework, but there is a good article on CodeProject with some examples

http://www.codeproject.com/KB/recipes/Combinatorics.aspx

+5
source

I also think that there is no permutation () function included in the .NET Framework. But you can always go and implement it yourself ...

... in this case, you may find this post helpful:

Fast permutation → number → permutation transformation algorithms

+1

Source: https://habr.com/ru/post/1752518/


All Articles