0
Q:

swap two elements of a vector

std::iter_swap(arr.begin()+pos1,arr.begin()+pos2);
1

New to Communities?

Join the community