I'll show you transform(v.begin(), v.end(), v.begin(), [](int x) { return x * 2; }) to modify each element. The third parameter specifies where to write the results. Combine with remove_if to filter: v.erase(remove_if(v.begin(), v.end(), [](int x) { return x < 0; }), v.end()) removes all negative values from the vector.
These patterns replace manual loops with readable algorithm calls. The code becomes shorter and communicates intent more to future readers.