class Solution { public: void reOrderArray(vector<int> &array) { int end=array.size()-1; int start=0; while(start<end){ while (array[start]&1) { start++; } while((array[end]&1)!=1) end--; if(start<end) swap(array[start],array[end]); } } };