Skip to content

Instantly share code, notes, and snippets.

@ssartell
Created April 29, 2019 13:13
Embed
What would you like to do?
/* 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