I am getting a error somewhere in the RETURN type of the solution

Please help me rectify my mistake

i think reverse function just reverses the array you are considering , it doesn’t returns a vector.
Try reverse(v.begin(), v.end()); and return v;

3 Likes

yes, yes … that was the mistake I made … Thanks for solving my query :blush:

1 Like