Python3 O(n) Solution, beats 99%
\nclass Solution:\n    def sortArrayByParity(self, A):\n        """\n        :type A: List[int]\n        :rtype: List[int]\n        """\n        current = 0\n  
```\nclass Solution:\n    def sortArrayByParity(self, A):\n        """\n        :type A: List[int]\n        :rtype: List[int]\n        """\n        current = 0\n        for i, el in enumerate(A):\n            if not el % 2:\n                A[current], A[i] = A[i], A[current]\n                current = current + 1\n        return A\n            ``\n```
[]