C# One Liner

  • 0
    using System.Linq;
    public class Solution {
        public IList<int> FindDisappearedNumbers(int[] nums) {
            return Enumerable.Range(1,nums.Length).Except(nums.Distinct()).ToList();

    Can anyone tell me why my solution beats only 37.67% of C# submissions?

    How does LINQ work internally?

    Thanks in advance!

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.