Java two pointers one pass, beats 99%
\n`public int[] sortArrayByParityII(int[] A) {\n        int[] res = new int[A.length];\n        int i = 0, k = 1;\n        for (int j = 0; j < A.length; j++) {\
```\n`public int[] sortArrayByParityII(int[] A) {\n        int[] res = new int[A.length];\n        int i = 0, k = 1;\n        for (int j = 0; j < A.length; j++) {\n            if (A[j] % 2 == 0) {\n                res[i] = A[j];\n                i+=2;\n            } \n            else {\n                res[k] = A[j];\n                k+=2;\n            }\n        }\n        return res;\n    }\n```
[]