1// my linkedin : https://www.linkedin.com/in/vaalarivan-prasanna-3a07bb203/
2vector<int> AB;
3AB.reserve(A.size() + B.size()); // preallocate memory
4AB.insert(AB.end(), A.begin(), A.end());
5AB.insert(AB.end(), B.begin(), B.end());
6//eg : A = {4, 1}, B = {2, 5}
7//after the 2 insert operations, AB = {4, 1, 2, 5}