Question: Hello, I want to return a reversed vector and noticed an issue when reversing it a certain way reverse(result.begin(),result.end()); return result; Why does returning it
Hello, I want to return a reversed vector and noticed an issue when reversing it a certain way
reverse(result.begin(),result.end());
return result;
Why does returning it like this work but this doesn't:
return reverse(result.begin(),result.end());
Why is that the case?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
