how to perform add 2 to each element of vector in c++ in O(1) code example
Example: how to append two vectors in c++
std::vector<int> AB = A;
AB.insert(AB.end(), B.begin(), B.end());
std::vector<int> AB = A;
AB.insert(AB.end(), B.begin(), B.end());