cpp/algorithm/copy backward

Copies the elements from the range, defined by, to another range ending at. The elements are copied in reverse order (the last element is copied first), but their relative order is preserved.

The behavior is undefined if is within. std must be used instead of in that case.

Return value
Iterator to the last element copied.

Complexity
Exactly assignments.