We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d34171 commit 51337c4Copy full SHA for 51337c4
ruby/136-Single-Number.rb
@@ -0,0 +1,3 @@
1
+def single_number(nums)
2
+ nums.inject { |accu, num| accu ^ num }
3
+end
0 commit comments