Skip to content

Commit 4886724

Browse files
authored
Merge pull request #866 from pontusdacke/136-Single-Number
Add csharp solution for 136 Single Number
2 parents 8ddbada + 92f1f4d commit 4886724

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

csharp/136-Single-Number.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
public class Solution {
2+
public int SingleNumber(int[] nums) {
3+
var x = 0;
4+
for (int i=0;i < nums.Length; i++)
5+
{
6+
x ^= nums[i];
7+
}
8+
return x;
9+
}
10+
}

0 commit comments

Comments
 (0)