###### First Missing Positive

def firstMissingPositive_1(self, nums):
n=len(nums)
for i in xrange(n):
while nums[i]>0 and nums[i]<n+1 and nums[i]!=i+1 and nums[nums[i]-1]!=nums[i]:
nums[nums[i]-1],nums[i]=nums[i],nums[nums[i]-1]
miss=1
for x in nums:
if x!=miss:
return miss
miss+=1
return miss

#### First Missing Positive -- LeetCode

2014-03-13 04:31:27

#### 【LeetCode】First Missing Positive 解题报告

2014-12-28 21:00:14

#### Leetcode：First Missing Positive

2013-10-23 16:27:01

#### leetcode笔记：First Missing Positive

2015-12-24 01:45:52

#### [leetcode]41. First Missing Positive,C++/python实现，hard难度

2016-06-16 19:37:56

#### LeetCode(41) First Missing Positive

2014-12-31 08:08:19

#### Leetcode First Missing Positive 三个思路

2013-12-06 07:52:46

#### First Missing Positive Given an unsorted integer array, find the first missing positive integer. Fo

2015-01-26 16:15:38

#### leetCode 41.First Missing Positive (第一个丢失的正数) 解题思路和方法

2015-07-10 10:25:58

#### leetcode_c++：First Missing Positive（041）

2016-05-23 00:28:48

## 不良信息举报

First Missing Positive