Integer Division Without Using * or /


Given two integers, xx and yy, return x÷yx ÷ y without using division (//) or multiplication (*) operators.

Note: Assume that both integers are positive.


Let’s take the example of 7÷27 ÷ 2:

Sample input

Here 77 is the dividend and 22 is the divisor.

7, 2

Expected output


Try it yourself

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.