std::vector<int> vec = {1, 2, 3, 4, 5};
int value = 3;
vec.erase(std::remove(vec.begin(), vec.end(), value), vec.end());
std::vector<int> vec = {1, 2, 2, 3, 4, 4, 5};
vec.erase(std::unique(vec.begin(), vec.end()), vec.end());
std::vector<int> vec = {1, 2, 3, 4, 5};
int threshold = 3;
vec.erase(std::remove_if(vec.begin(), vec.end(), [threshold](int x) { return x < threshold; }), vec.end());
std::vector<int> vec = {1, 2, 3, 4, 5};
vec.erase(std::remove_if(vec.begin(), vec.end(), [](int x) { return x % 2 == 0; }), vec.end());
std::transform(vec.begin(), vec.end(), vec.begin(), [](int x) { return x * 2; });