@@ -0,0 +1,858 @@
+package leetcode.first_missing_positive;%0A%0Apublic class Solution %7B%0A    public int firstMissingPositive(int%5B%5D A) %7B%0A        if(A == null %7C%7C A.length == 0) return 1;%0A        int length = A.length;%0A        for(int i = 0; i %3C length; i++)%7B%0A        %09if(A%5Bi%5D %3C 0) A%5Bi%5D = 0;%0A        %7D%0A        for(int i = 0; i %3C length; i++)%7B%0A        %09int target = Math.abs(A%5Bi%5D);%0A        %09if(target %3E 0 && target %3C= length)%7B%0A        %09%09if(A%5Btarget - 1%5D == 0)%7B%0A        %09%09%09A%5Btarget - 1%5D = -target;%0A        %09%09%7Delse%7B%0A        %09%09%09A%5Btarget - 1%5D = -Math.abs(A%5Btarget - 1%5D);%0A        %09%09%7D%0A        %09%7D%0A        %7D%0A        for(int i = 0; i %3C length; i++)%7B%0A        %09if(A%5Bi%5D %3E= 0) return i + 1;%0A        %7D%0A        return length + 1;%0A    %7D%0A    %0A    %0A    public static void main(String%5B%5D args)%7B%0A    %09int%5B%5D input = new int%5B%5D%7B1%7D;%0A    %09System.err.println(new Solution().firstMissingPositive(input));%0A    %7D%0A%7D%0A

Add java solution for 41. First Missing Positive