Algorithm · Amazon · Hard
You are given two signed 32-bit integers, dividend and divisor. Write a function that computes the integer quotient of dividend / divisor, but you may not use the *, /, or % operators. The result must be truncated toward zero: remove any fractional part, so a value such as -3.9 becomes -3, not -4. You may assume divisor is never zero. If the exact quotient would be outside the signed 32-bit integer range, return the largest signed 32-bit integer, 2147483647 ($$2^{31}-1$$).…
Checking your access…