We do more in-place and operate on the end of the vector to avoid quadratic complexity.
This is cleaner and faster, with inherent methods and mutability.