My LeetCode grinding. Trying to do a problem a day.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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