Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Sort Array By Parity

public class Solution 
{
    public int[] SortArrayByParity(int[] nums) =>nums.Select(x => x).Where(x=>x%2==0).Concat(nums.Select(x => x).Where(x=>x%2!=0)).ToArray();
}
 
PREVIOUS NEXT
Tagged: #Sort #Array #By #Parity
ADD COMMENT
Topic
Name
6+8 =