本体借用乔同学的解体思路:

Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator.

Return the quotient after dividing dividend by divisor.

Example 1:

Input: dividend = 10, divisor = 3
Output: 3

Example 2:

Input: dividend = 7, divisor = -3
Output: -2

Input: dividend = 7, divisor = -3
Output: -2


leetcode 29 Divide Two Integers

相关文章: