Skip to content

Instantly share code, notes, and snippets.

@ssartell

ssartell/21.cs Secret

Last active May 22, 2019 17:41
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/9b621555e9015b4d3ef0cd446604245c to your computer and use it in GitHub Desktop.
Save ssartell/9b621555e9015b4d3ef0cd446604245c to your computer and use it in GitHub Desktop.
/* LINQ Puzzle #21 *******************************************************
Summary: Given a list integers, generate every sublist. A sublist is any consecutive sequence that
appears in the original list.
Sample: { 1, 2, 3 } => {
{1},
{2},
{3},
{1, 2},
{2, 3},
{1, 2, 3}
}
************************************************************************/
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