@@ -0,0 +1,900 @@
+// Divide two integers without using multiplication, division and mod operator.%0A%0A%0Apublic class Solution %7B%0A    public int divide(int dividend, int divisor) %7B%0A        // assume given divisor will always be non-zero.%0A        if(dividend == 0)%7B%0A            return 0;%0A        %7D%0A%0A        boolean isNeg = (dividend %3E 0 && divisor %3C 0) %7C%7C (dividend %3C 0 && divisor %3E 0);%0A%0A        long dvd  = Math.abs((long)dividend);%0A        long dvs = Math.abs((long)divisor);%0A        // dividend = Math.abs(dividend);%0A        // divisor = Math.abs(divisor);%0A        int step = 0;%0A%0A        while((dvs %3C%3C 1) %3C= dvd)%7B%0A            dvs %3C%3C= 1;%0A            step++;%0A        %7D%0A%0A        int res = 0;%0A%0A        while(step %3E= 0)%7B%0A            if(dvd %3E= dvs)%7B%0A                dvd -= dvs;%0A                    res += 1 %3C%3C step;   %0A            %7D%0A%0A            dvs %3E%3E= 1;%0A            step--;%0A        %7D%0A            %0A        return res; %0A    %7D%0A%7D

update divide two integers solution