@@ -0,0 +1,699 @@
+package leetcode;%0A%0Apublic class Task26 %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        System.out.println(new Task26().removeDuplicates(new int%5B%5D%7B1, 1, 2%7D));%0A        System.out.println(new Task26().removeDuplicates(new int%5B%5D%7B1, 2%7D));%0A        System.out.println(new Task26().removeDuplicates(new int%5B%5D%7B0, 0, 1, 1, 1, 2, 2, 3, 3, 4%7D));%0A        System.out.println(new Task26().removeDuplicates(new int%5B%5D%7B1%7D));%0A    %7D%0A%0A    public int removeDuplicates(int%5B%5D nums) %7B%0A        int uniq = 1;%0A        for (int i = 1; i %3C nums.length; i++) %7B%0A            if (nums%5Bi%5D != nums%5Bi - 1%5D) %7B%0A                uniq++;%0A                nums%5Buniq - 1%5D = nums%5Bi%5D;%0A            %7D%0A        %7D%0A        return uniq;%0A    %7D%0A%7D%0A

Add Task26