Skip to content

Instantly share code, notes, and snippets.

@ssartell

ssartell/22.cs Secret

Created May 31, 2019 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssartell/c6940ae0a14a19e9d889378442751fd8 to your computer and use it in GitHub Desktop.
Save ssartell/c6940ae0a14a19e9d889378442751fd8 to your computer and use it in GitHub Desktop.
/* LINQ Puzzle #22 *******************************************************
Summary: Given a list integers, generate every permutation (i.e. all possible orderings).
Assume each integers are unique.
Sample: { 1, 2, 3 } => {
{1, 2, 3},
{1, 3, 2},
{2, 1, 3},
{2, 3, 1},
{3, 1, 2},
{3, 2, 1}
}
************************************************************************/
var ints = new[] { 1, 2, 3, 4 };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment