C++ simple and short..
\nclass Solution {\npublic:\n    vector<int> sortArrayByParity(vector<int>& A) \n    {\n        int n=A.size();\n        int c=0;\n        for(int i=0;i<n;i++)\
```\nclass Solution {\npublic:\n    vector<int> sortArrayByParity(vector<int>& A) \n    {\n        int n=A.size();\n        int c=0;\n        for(int i=0;i<n;i++)\n        {\n            if(A[i]%2==0)\n            {\n                swap(A[i],A[c]);\n                c++;\n            }\n        }\n        return A;\n    }\n};\n```
[]