My LeetCode grinding. Trying to do a problem a day.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

123456789101112131415161718
  1. Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A.
  2. You may return any answer array that satisfies this condition.
  3. Example 1:
  4. Input: [3,1,2,4]
  5. Output: [2,4,3,1]
  6. The outputs [4,2,3,1], [2,4,1,3], and [4,2,1,3] would also be accepted.
  7. Note:
  8. 1 <= A.length <= 5000
  9. 0 <= A[i] <= 5000