@@ -0,0 +1,593 @@
+public class Solution %7B%0A    public int removeDuplicates(int%5B%5D A) %7B%0A        if(A.length %3C 2) return A.length;%0A        int count = 1;%0A        for(int i = 1; i %3C A.length; i++) %7B%0A            if(A%5Bi%5D != A%5Bi-1%5D)%0A                A%5Bcount++%5D = A%5Bi%5D;%0A        %7D%0A        return count;%0A    %7D%0A%7D%0A%0A// solution 2 (more efficient)%0Apublic class Solution %7B%0A    public int removeDuplicates(int%5B%5D A) %7B%0A        if(A.length %3C 2)    return A.length;%0A        int count = 0;%0A        for(int i = 1; i %3C A.length; i++)%0A            if(A%5Bcount%5D != A%5Bi%5D)%0A                A%5B++count%5D = A%5Bi%5D;%0A        return count + 1;%0A    %7D%0A%7D%0A

Create 026.java