Skip to content

Instantly share code, notes, and snippets.

@ssartell

ssartell/19.cs Secret

Created May 17, 2019 19:04
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/893fd190d88339bdfbcb545a8b4548c3 to your computer and use it in GitHub Desktop.
Save ssartell/893fd190d88339bdfbcb545a8b4548c3 to your computer and use it in GitHub Desktop.
/* LINQ Puzzle #19 *******************************************************
Summary: Given a list integers, generate every pairwise combination of integers. Order of the pair
doesn't matter, but { 1, 2 } is the same as { 2, 1 } and you shouldn't have duplicates.
Sample: { 1, 2, 3, 4 } => {{1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4}, {3, 4}}
************************************************************************/
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