Skip to content

Instantly share code, notes, and snippets.

@ssartell
Created April 22, 2019 18:23
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/152eec0e3b7c4e096ab033a967f439f0 to your computer and use it in GitHub Desktop.
Save ssartell/152eec0e3b7c4e096ab033a967f439f0 to your computer and use it in GitHub Desktop.
/* LINQ Puzzle #10 *******************************************************
Summary: Given an array of integers between 0 and 100, return a list of lists of consecutive integers. The output might be used to output ranges of consecutive numbers.
Sample Input: {1, 2, 4, 6, 7, 8, 20}
Sample Output: {{1, 2}, {4}, {6, 7, 8}, {20}}
************************************************************************/
var ints = new [] { 1, 2, 3, 5, 7, 8, 9 };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment