LeetCode/cs/single-number.cs

6 lines
122 B
C#
Raw Normal View History

public class Solution {
public int SingleNumber(int[] nums) {
return nums.Aggregate((x, y) => x ^ y);
}
}