From c838c9992767fa1326fe050bc71524712e1599ac Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Mon, 8 Jan 2024 22:29:29 +0100 Subject: [PATCH] =?UTF-8?q?cs:=20add=20=E2=80=9C136.=20Single=20Number?= =?UTF-8?q?=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matej Focko --- cs/single-number.cs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 cs/single-number.cs diff --git a/cs/single-number.cs b/cs/single-number.cs new file mode 100644 index 0000000..4fd3137 --- /dev/null +++ b/cs/single-number.cs @@ -0,0 +1,5 @@ +public class Solution { + public int SingleNumber(int[] nums) { + return nums.Aggregate((x, y) => x ^ y); + } +}