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
1 Like