Question: Write two functions that reverse the order of elements in a vector. For example, 1, 3, 5, 7, 9 becomes 9, 7, 5, 3, 1.
Write two functions that reverse the order of elements in a vector. For example, 1, 3, 5, 7, 9 becomes 9, 7, 5, 3, 1. The first reverse function should produce a new vector with the reversed sequence, leaving its original vector unchanged. The other reverse function should reverse the elements of its vector without using any other vectors.
Step by Step Solution
3.45 Rating (165 Votes )
There are 3 Steps involved in it
write two reverse functions that reverses the ... View full answer
Get step-by-step solutions from verified subject matter experts
