Cpp one pass solution
\nclass Solution {\npublic:\n    vector<int> sortArrayByParity(vector<int>& A) {\n        int i=0;\n        for(int j=0;j<A.size();++j){\n            if(A[j]%2=
```\nclass Solution {\npublic:\n    vector<int> sortArrayByParity(vector<int>& A) {\n        int i=0;\n        for(int j=0;j<A.size();++j){\n            if(A[j]%2==0){\n                swap(A[i],A[j]);\n                i++;\n            }\n        }\n        return A;\n    }\n};\n```
[]