Leetcode 分享筆記

41. First Missing Positive

等級: Hard

原始題目連結請點此

leetcode
[python]
class Solution(object):
def firstMissingPositive(self, nums):
“””
:type nums: List[int]
:rtype: int
“””
j = 1
new = set(nums)
while True:
if j not in new:
return j
j = j + 1
[/python]