diff --git a/solution/0041.First Missing Positive/Solution.py b/solution/0041.First Missing Positive/Solution.py new file mode 100644 index 0000000000000..94dd856868cb0 --- /dev/null +++ b/solution/0041.First Missing Positive/Solution.py @@ -0,0 +1,11 @@ +class Solution: + def firstMissingPositive(self, nums): + """ + :type nums: List[int] + :rtype: int + """ + + i = 1 + while i in nums: + i += 1 + return i