import java.util.Hashtable;

public class Solution {

public int firstMissingPositive(int[] nums) {

```
Hashtable<Integer,Integer> hash = new Hashtable();
for(int i = 0;i < nums.length;i++){
hash.put(nums[i],1);
}
for(int i = 1;i <= nums.length+1;i++){
if(!hash.containsKey(i))
return i;
}
return 1;
}
```

}