Create First Missing Positive

Give n integer so the first missing position integer must be in 1 to n+1. so we just need to traversal the array A, make sure A[i] = i + 1(i from 0 to n - 1) if there exists integer i + 1.  Then scan the array A, the first missing integer must be the one A[i] ！= i + 1.