Answers for "Sort Array By Parity"

C#
1

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();
}
Posted by: Guest on May-02-2022

C# Answers by Framework

Browse Popular Code Answers by Language