Python 2 pointer in place swap, beats 99%
Idea is simple - if odd is on the left and even is on the right, then we swap\n\nclass Solution:\n    def sortArrayByParity(self, A):\n        """\n        :typ
Idea is simple - if odd is on the left and even is on the right, then we swap\n```\nclass Solution:\n    def sortArrayByParity(self, A):\n        """\n        :type A: List[int]\n        :rtype: List[int]\n        """\n        start, end = 0, len(A) - 1\n        while start < end:\n            m, n = A[start], A[end]\n            if m % 2 == 1 and n % 2 == 0:\n                A[start], A[end] = n, m\n            elif m % 2 == 1:\n                end -= 1\n            elif n % 2 == 0:\n                start += 1\n            else:\n                start += 1\n                end -= 1\n        return A\n                \n```
[]