Divide Integers

Divide two integers without using multiplication, division and mod operator.

Return the floor of the result of the division.


5 / 2 = 2

Also, consider if there can be overflow cases. For overflow case, return INT_MAX.

Interview Code Editor
  • Solution Approach
  • Complete Solution
4065 successful submissions.
Asked In:
  • Microsoft
  • Amazon
Click here to jump start your coding interview preparation