@@ -0,0 +1,759 @@
+public class RemoveElement %7B%0A    /** %0A     *@param A: A list of integers%0A     *@param elem: An integer%0A     *@return: The new length after remove%0A     */%0A    public int removeElement(int%5B%5D A, int elem) %7B%0A        if (A == null %7C%7C A.length == 0) %7B%0A            return 0;%0A        %7D%0A        int i = 0;%0A        int pointer = A.length - 1;%0A        while (i %3C= pointer) %7B%0A            if (A%5Bi%5D == elem) %7B%0A                // if find the occurance, we know A%5Bi%5D need to be removed. Here we override the A%5Bi%5D with pointer's value. %0A                // And we will continue check until it doesn't equal to elem%0A                A%5Bi%5D = A%5Bpointer%5D;%0A                pointer--;%0A            %7D else %7B%0A                i++;%0A            %7D%0A        %7D%0A        return pointer+1;%0A    %7D%0A%7D%0A

Create RemoveElement.java