Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1b3ebd8

Browse files
committed
2020-03-03
1 parent ab2ef8b commit 1b3ebd8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Solution(object):
2+
def findRepeatNumber(self, nums):
3+
"""
4+
:type nums: List[int]
5+
:rtype: int
6+
"""
7+
visited = set()
8+
for num in nums:
9+
if num in visited:
10+
return num
11+
visited.add(num)

0 commit comments

Comments
 (0)