java . TWO pointer . ONE PASS. !!!
Please upvote if helpful!!\n\nclass Solution {\n    public int[] sortArrayByParity(int[] A) {\n        \n        int[] result = new int[A.length];\n        \n  
* **Please upvote if helpful!!**\n```\nclass Solution {\n    public int[] sortArrayByParity(int[] A) {\n        \n        int[] result = new int[A.length];\n        \n        int evenPointer = 0;\n        int oddPointer = result.length - 1;\n        \n        for(int i = 0; i < A.length; i++){\n            int num = A[i];\n            if(num % 2 == 0){\n                result[evenPointer] = num;\n                evenPointer++;\n            }else{\n                result[oddPointer] = num;\n                oddPointer--;\n            }\n        }\n        \n        return result;\n    }\n}\n```
['Java']