LeetCode/cs/single-number.cs
Matej Focko c838c99927
cs: add “136. Single Number”
Signed-off-by: Matej Focko <mfocko@redhat.com>
2024-01-08 22:29:29 +01:00

5 lines
122 B
C#

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