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 5e20093 commit f19005aCopy full SHA for f19005a
src/chapter11searching/singleUniqueNumber.py
@@ -0,0 +1,20 @@
1
+# Copyright (c) Dec 22, 2014 CareerMonk Publications and others.
2
+# E-Mail : [email protected]
3
+# Creation Date : 2014-01-10 06:15:46
4
+# Last modification : 2008-10-31
5
+# by : Narasimha Karumanchi
6
+# Book Title : Data Structures And Algorithmic Thinking With Python
7
+# Warranty : This software is provided "as is" without any
8
+# warranty; without even the implied warranty of
9
+# merchantability or fitness for a particular purpose.
10
+
11
+class Solution(object):
12
+ def singleNumber(self, A):
13
+ """
14
+ :type A: List[int]
15
+ :rtype: int
16
17
+ result = 0
18
+ for n in A:
19
+ result ^= n
20
+ return result
0 commit comments