Skip to content

Commit 41b3975

Browse files
committed
2020-08-02
1 parent 8a424e4 commit 41b3975

File tree

1 file changed

+10
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)