My LeetCode grinding. Trying to do a problem a day.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

problem.txt 385B

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