Integer Division Without Using * or /

Statement

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

Note: Assume that both integers are positive.

Example

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

3

Try it yourself

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