Given two integers dividend and divisor, divide them without using multiplication, division, or mod operator and return the quotient truncated toward zero. Clamp the result to the 32-bit signed integer range if overflow occurs.
dividend and divisor = integers
truncated quotient as a 32-bit signed integer
Example 1:
Input:
dividend = 10 divisor = 3
Output:
3
Explanation:
10 / 3 truncates toward zero as 3.
Example 2:
Input:
dividend = 7 divisor = -3
Output:
-2
Explanation:
7 / -3 = -2.333..., truncated toward zero is -2.