JavaScript beats 100%
```\n    var ans = new Array(A.length);\n    var odd = 1, even = 0;\n    \n    for (var i = 0; i < A.length ; i++){\n        if (A[i] % 2 === 0){\n            a
```\n    var ans = new Array(A.length);\n    var odd = 1, even = 0;\n    \n    for (var i = 0; i < A.length ; i++){\n        if (A[i] % 2 === 0){\n            ans[even] = A[i];\n            even += 2;\n        }else{\n            ans[odd] = A[i];\n            odd += 2;\n        }\n    }\n\n    return ans;
[]