[Java] Two pointers inplace O(n) time simple & straightforward
\npublic int[] sortArrayByParityII(int[] A) {\n        int e = 0;\n        int o = 1;\n        \n        while(e < A.length && o < A.length) {\n            if(A
```\npublic int[] sortArrayByParityII(int[] A) {\n        int e = 0;\n        int o = 1;\n        \n        while(e < A.length && o < A.length) {\n            if(A[e]%2 != 0) {\n                swap(A, e, o);\n                o += 2;\n            } else {\n                e += 2;\n            }\n        }\n\n        return A;\n    }\n```
[]