Aren't we swapping each and every element of both the vectors?

or we are just swapping their names only?

@we_kaash implementation of the swap function is not mentioned but you can see the time complexity in the documentation which is given as constant, ie O(1). https://www.cplusplus.com/reference/vector/vector/swap/

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.