Skip to content

Instantly share code, notes, and snippets.

@ssartell
Created April 29, 2019 13:13
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/6b81299d6f8dabf58f664a0c5bce1ac5 to your computer and use it in GitHub Desktop.
Save ssartell/6b81299d6f8dabf58f664a0c5bce1ac5 to your computer and use it in GitHub Desktop.
/* LINQ Puzzle #16 *******************************************************
Summary: Given two lists, determine if the second list is found in the first. In other words, is the second a sub-list of the first?
Sample: {0, 1, 2, 3, 4, 5, 6, 8, 9}, {5, 6, 8} => true
{1, 2, 3, 4}, {1, 2, 4} => false
{5, 6}, {5} => true
************************************************************************/
var first = new int[] {0, 1, 2, 3, 4, 5, 6, 8, 9};
var second = new int[] {5, 6, 8};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment