Skip to content

Instantly share code, notes, and snippets.

@ssartell

ssartell/22.cs Secret

Created May 31, 2019 14:25
Embed
What would you like to do?
/* 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