Intern — Middle
Function that reverses the order of vector elements
livecode
Task condition
It is required to implement a function that takes a non-const reference to std::vector, modifies its contents so that the elements are in reverse order, and does not return any value.
Example signature:
void reverseVector(std::vector<int>& vec);