My LeetCode grinding. Trying to do a problem a day.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

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