Pergunta de entrevista da empresa Amazon

Implement integer division as it works in Java, without using the division operator.