905. Sort Array By Parity
Easy
Given an integer array nums
, move all the even integers at the beginning of the array followed by all the odd integers.
Return any array that satisfies this condition.
Example 1:
Example 2:
Constraints:
1 <= nums.length <= 5000
0 <= nums[i] <= 5000
解題
Last updated