Simple Java ,easy to understand 99%, 77%, 1ms
\nclass Solution {\n    public int[] sortArrayByParity(int[] A) {\n        int arr[]=new int[A.length];\n        int j=0;\n        int k=A.length-1;\n        fo
```\nclass Solution {\n    public int[] sortArrayByParity(int[] A) {\n        int arr[]=new int[A.length];\n        int j=0;\n        int k=A.length-1;\n        for(int i=0;i<A.length;i++)\n        {\n            if(A[i]%2==0)\n            {   \n                arr[j]=A[i];\n                j++;\n            }\n            else\n            {   \n                arr[k]=A[i];\n                k--;\n            }\n        }\n        return arr;\n    }\n}\n```
['Java']