public class Solution { public int[] FindErrorNums(int[] nums) =>nums.Concat(Enumerable.Range(1, nums.Length)) .GroupBy(x=>x).Where(x=>x.Count()==1) .Select(x=>x.Key).ToArray(); }