You are viewing a single comment's thread. Return to all comments →
Can anyone explain why can't we just use the following plain approach compared to these solutions?
vector<int> reverseArray(vector<int> a) { vector<int> b; for(int i = a.size()-1;i>=0;i--){ b.push_back(a[i]); } return b; }
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 →
Can anyone explain why can't we just use the following plain approach compared to these solutions?