I need to check if a list contains all the items and in the same sequence using LINQ and if match found return the last matching element.
var allWords = new List<string> { "A", "B", "C", "D", "E", "F"};
var words = new List<string>() { "D", "E" };
Should return element "E" (because there is a match)