There are a lot of questions how to remove simply repeating strings:
but my question differs from them.
For example, if I have entry vector<string>
:
{"111", "222", "222", "222", "333", "222"}
I need to get the following result:
{"111", "222", "333", "222"}
it means deleting nearby repeating values only.
My current temporary solution is to create another vector, copy each element from entry vector with checking if this element isn't equal to the last element of the second vector.