I use Winforms and C#. And I have more than 300 integers in a list and this is short example:
List<int> lst = new List<int>();
lst.Add(4);
lst.Add(25);
lst.Add(26);
lst.Add(27);
lst.Add(38);
lst.Add(51);
lst.Add(52);
lst.Add(53);
lst.Add(75);
//Etc.
I need to remove values (25, 26) but keep 27. Then again remove values (51, 52) but keep 53.. etc.
So basically if three consecutive values such as (1, 2, 3) are found, we need to remove (1, 2) and keep value (3).
As far as attempts are concerned, I couldn't scratch my head around any solution so far therefore I would appreciate any help.
Thanks