You are viewing a single comment's thread. Return to all comments →
I'd say a much bettery solution (for c++14) is:
vector<int> reverseArray(vector<int> a) { vector<int> y; for(auto x = a.end()-1; x >= a.begin(); x--) y.push_back(*x); return y; }
Seems like cookies are disabled on this browser, please enable them to open this website
Arrays - DS
You are viewing a single comment's thread. Return to all comments →
I'd say a much bettery solution (for c++14) is: