I have a list of integers that I would like to search for a sequence.
For example, if i have a master list:
1, 2, 3, 4, 9, 2, 39, 482, 19283, 19, 23, 1, 29
And I want to find sequence:
1, 2, 3, 4
I would like some easy way to fill a subset list with:
1, 2, 3, 4 + the next five integers in the master list
And then remove the integers in the subset list from the master list so at the end of the operation, my lists would look like this:
Master list:
19, 23, 1, 29
Subset list:
1, 2, 3, 4, 9, 2, 39, 482, 19283
Hope that makes sense. I'm guessing maybe linq would be good for something like this, but I've never used it before. Can anyone help?