leetcode 29 Divide Two Integers

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

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



阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页