The function _______ allows you to swap the elements of two containers in C++ STL. 

  • push_back 
  • begin 
  • swap 
  • emplace_back
The swap function in C++ STL allows for a quick swap of elements between two containers. This operation is usually done in constant time as only the internal pointers are exchanged.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *