One Line C# Solution


  • 0
    R
        public int MissingNumber(int[] nums) {
            return (nums.Length+1)*nums.Length/2 - nums.Aggregate((a,b) => a+b);
        }
    

Log in to reply
 

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