I want to move elements inside the container in any position left or right. Moving items are not adjacent.
for example, I have a vector {1,2,3,4,5,6,7,8} and I want to shift {4,5,7} to the left by 2 positions, the expected result will be {1,4,5, 2,7,3,6,8}
Is there an elegant way to solve it?
c ++ stl containers
Serik
source share